Former Pakistani Prime Minister Imran Khan granted bail after dramatic arrest