properly shutdown server on ^C

When running the js/api/server.js in a console, one would usually
terminate using ^C which emit a SIGINT signal to the process. Node seems
to kill it as is.

This patch factor the function used to shutdown the master which was
only registered for SIGTERM.  The function is then registered for SIGINT
ensuring both modes are shutdowning alike and letting us shutdown the
master and its worker with a ^C.

Finally, added another console.log() to make it obvious the master is
being shutdown.

Change-Id: I71af552c1899129ddf629654670dd4238986c2b1