core: Make sure configured logfile always trumps default one

Previously we could end up logging to the default location if we
had deprecated variables defined before we defined log_file (which
caused us to write to the log_file set as default at compile time),
but the logging api is clever enough to keep that file open and
won't reopen it unnecessarily.

With this patch, we always close the log_file whenever we run into
the log_file statement, which causes the logging api to reopen it
with the new (and correct) path whenever we want to log something
again.

Signed-off-by: Andreas Ericsson <ae@op5.se>
core: Log deprecated variables to the 'final' logfile

The previous patch made sure we started writing "real" logmessages
to the right place, but could still cause some logmessages to end up
in the wrong logfile. With this change we protect against that by
adding deprecated variables to a list and printing their warnings
when we're done parsing the entire file (which means we've always
parsed the 'log_file' statement).

Signed-off-by: Andreas Ericsson <ae@op5.se>