Fix PID file, enhance JSON-based configuration

The problem with the PID file was that monit would sometimes detect a failure (or, in my case, always, because my app didn't respond to / ) and start the service again.  The PID file would be overwritten with that new daemond, but then it would crash because there was still a server running and port 80 was being used.

This pull request also generalizes the properties file to load arbitrary environment variables.