Court grants bail to Mufti Qavi