Which war caused Britain to lose some of its oldest and most populous colonies