Fiddle with the heartbeat script, needs to run independently?

So we can't really map the heartbeat function into the app itself,
particularly if the app is running with no concurrency (say in dev mode,
using the builtin bottle server).

I think it's unavoidable that we'll need to make it completely
independent of the main codebase, and run it accordingly (another
daemontools service). I've arbitrarily picked localhost:8040 for it to
run on.