Sri Lankan editor is granted bail