The answer should be D. He quit when a referendum resulted in the UK voting to leave the European union. I know that A is incorrect, because he never died in office, and B, and C don't make sense to his choice in leaving the office.
Hope this helps!:)