Add a -d flag to disable daemonization

when not daemonized:

* don't detach
* log to stderr
* don't close stderr, and redirect stdout to stderr
* don't drop a pidfile