AAP legislator Amanatullah Khan granted bail