A court in Islamabad has dismissed charges against a Muslim cleric arrested on suspicion of framing a Christian girl, 14-year-old Rimsha Masih, for blasphemy.