Johnson critic quits ahead of Tory result