Fix ssh restart hang

The remote ssh shell won't exit until all file descriptors have been closed.   After that point the detached process can open any file descriptors it wants. This pull request...

1) Fixes a file descriptor leak when reading the jvm config.   This leaked fd was opened before the fork so contributed to the hang.
2) Closes stderr, stdout, and stdin so for a very small window no fds are open.   It then forks cronolog and redirects stderr and stdout to the new cronolog processes.   There's unfortunately a brief window where errors forking cronolog and redirecting to cronolog cannot be logged.   The old approach forked and redirected cronolog first, but the open cronolog pipes unfortunately hang the remote shell.
3) Moves a global semaphore init a touch lower so its fd is created after stderr/stdout/stderr are closed.