William Beckett — British railway engineer in India and army officer