How the British Empire created foreign investment