Pakistani minister resigns over anti-army remarks