A £9bn nuclear submarine contract has been awarded to Rolls-Royce - hailed by the government as a win for the economy and the UK's nuclear deterrent.