Move _sort_lines from parse_data to parse_file

Keep the high-level logic in parse_file so that consumers of the
library can decide if they want to sort lines later on (in case,
say, a consumer feeds more than one file and wants to merge them).