Cuba’s National Assembly has approved a new law on foreign investment, intended to attract capital to the island.