Pakistani police have arrested thousands of Imran Khan supporters ahead of a rally in Islamabad to demand the former prime minister's release from prison.