on boot, ensure nginx starts after all network interfaces

* the existing config only waited until the loopback interface was
  ready, causing nginx to fail to start
* the static-network-up event has been available since upstart 1.3 in
  Ubuntu 11.10. It is emitted when all statically configured interfaces
  are up and ready
upstart should restart nginx if it dies
use ERB to render our postgres tunnel upstart script

* instead of the upstart template
* allows me to control the start events and use static-network-up
* lets me use a pre-start block to delay execution by a few seconds and
  give postgresql a chance to start up
* the sleep is a dirty hack. If postgresql was managed by upstart then I
  could just add it to the start events. Oh well.