Splits the log function into three

The log function used to have a 'level' parameter, which would tell the
function who the log should be shown to. 0 was the user, 1 was the log
file, 2 was both. The problem was that it was very non-obvious what
level was what, and even I found myself forgetting who a certain log was
shown to.

This commit splits it into three functions, log_user, log_file, and
log_both. log_user simply prints the string, log_file will put the
string into the log file (along with a timestamp), and log_both will do
both.