Theresa May resigns as British prime minister