Lord Wharton has resigned as chair of the Office for Students six months before his term of office was due to end.