Powerful Afghan governor resigns following deal