A court has granted bail to an Indian federal minister, Narayan Rane, who was arrested over his remark about slapping Maharashtra state's chief minister.