NHS England’s national medical director has resigned seven years after taking up the post, saying it is “about time” he “handed the baton over”.