Improve worker script
Improve worker script

Note: There is still a race condition when this script is run
directly from capistrano. We'll be moving the script under
the control of monit instead.

Other posibilities would be using Proces.daemon to specifically
daemonize amqp_loader. However, this technique is not possible
with jruby, and I'd like to maintain portability for the tme being.

Main issue with capistrano seems to be that nohup is still sensitive
to hangup signles for a short while after starting. The issue can
also be 'resolved' with 'sleep 1' but obviously where race conditions
are concerned this isn't really solving the problem.

JamesGlover/event_warehouse,JamesGlover/event_warehouse,sanger/barcode_warehouse,emrojo/unified_warehouse,sanger/event_warehouse,sanger/barcode_warehouse,emrojo/unified_warehouse,sanger/unified_warehouse,emrojo/unified_warehouse,sanger/event_warehouse,JamesGlover/unified_warehouse,JamesGlover/unified_warehouse,JamesGlover/event_warehouse,sanger/barcode_warehouse,sanger/event_warehouse,sanger/unified_warehouse