Imran Khan in court in Pakistan after arrest of former PM sparks protests