main.c: moved parse block to avoid double parsing
main.c: moved tidyRelease(tdoc)s to right before reusing tdoc

sncf_free_train_info: check if *trains != NULL before indexing it as an array