From Egypt to Indonesia, all Islamic nations must learn from Pakistan’s mistakes