[main] Check the connection with the DB server at the start up.

If the connection fails, Hatohol server exits with error code:
EXIT_FAILURE before the deamonize. This behaivor helps users
notice the failure of the boot, because the error message is shown
in the console and the exit status is not 0.