Pakistan’s governor resigns as rival party wins polls