Prime Minister Theresa May gave notice of Britain’s withdrawal from the European Union, kicking off a two-year negotiation steeped in peril for both sides.