From Balapitiya beach resorts to the bustle of Colombo, this country is best traversed by rail, finds Alex Robinson