David Cameron resigns as prime minister after Britain votes Brexit, but for next three months he will continue as prime Minister.