Moved logging commands to a separate file.

Conflicts:
	src/command_local.cc
Use a generic function for logging and allow output groups to be appended.

log.open_file = "instrumentation_memory.log", "/foo/instrumentation_memory.log", "instrumentation_memory", ...
Added 'log.open_file_pid' and 'log.open_gz_file_pid' commands that appends the pid automatically.

Conflicts:
	src/command_local.cc
Minor changes for branch-0.9 tr1 usage.