OHIE-287 Fix API restart bug
OHIE-287 Fix API restart bug

The changes added in the last commit introduced a bug where the OpenHIM
core API was unable to restart. This commit adds changes that now make it possible to
successfully restart the OpenHIM core API server.

jembi/openhim-core-js,jembi/openhim-core-js