Correct forking inside the daemon function, correct the error messages
printed, and add two new options for controlling working directory
change and redirection of the standard file descriptors.
Correct the functionality that provides monitoring of the current
selected mailbox in each account, where the wrong variable was written.
Simplify and clarify the code around this functionality.
Move the source code to the src dir, the man pages to the doc dir, and
the example configuration files to the samples dir, and update all
relevant files to reflect the changes.