A government minister in Pakistan has stepped down after days of disruptive protests over accusations of blasphemy.