From planning well in advance to simply embracing flexibility, there are quite a few ways to save money while riding the rails.