Britain's most senior police officer has resigned following claims relating to the phone hacking scandal.