MPs will be given the opportunity to vote on whether to hold a second referendum on Britain's membership of the European Union, Theresa May has announced.