Britain’s Liberal Democrats said they would elect a new leader next year after Jo Swinson lost her seat in parliament at Thursday’s general election.