The US and Cuba are set to open embassies in each other's capitals, restoring diplomatic ties after over 50 years.