Ex-AGP Irfan Qadir appointed legal consultant to president