ASACORE-1149: Fix closing stdout/stderr when alljoyn-daemon forks

Also, rearrange when the closing happens as well as when logging the
version preamble so that when alljoyn-daemon runs as a daemon it
prints nothing to the screen.

Change-Id: I395d2e7b139677adff37e89a271a351f4078020c
Signed-off-by: Steve Kinneberg <stevek@qce.qualcomm.com>
Merge "ASACORE-1149: Fix closing stdout/stderr when alljoyn-daemon forks"