Tuesday night’s commuter train crash in Barcelona — which killed one person and injured 37 — highlights the ongoing challenges of railway safety, even in developed nations.