Abstract loading/dumping of YAML documents. Also all load_all and dump_all to support jsonline/ndjson format files; like exitcode file written in submit dir.