Norway has agreed to buy five new British warships in a deal worth £10bn, the Ministry of Defence has announced.