Malaysia and Singapore have signed a deal to build a high-speed railway linking their capital cities of Kuala Lumpur and Singapore.