log_load_header now always modifies log object

If the log object needs to be rolled back, then that needs to be handled
by the caller of log_load_header.
Moved configuration-related code into separate file

Also heavily altered parts of it.