Pakistani court quashes terrorism charges against ex-Premier Khan