path_sep_replace config option

I also took this opportunity to move and rename util.santize_for_path to
library.format_for_path, which was long overdue.
configurable max filename length
look up max filename length automatically
docs/changelog: filename length detection (GC-461)
original_{year,month,day,date} fields (GC-441)
original_date config option (GC-441)