Sri Lanka’s jailed ex-president granted bail