Add patches from production

- Add server_id to run jobs on the right host (i.e. for attachment processing)
- Add a unique key that can be overridden, for functionally identical jobs
  where the db record may vary in some way
- Add support for our indexed jobs table (causing mysql errors)
- Add fix for instance variables being serialized weirdly
- Add support for running jobs from just one site from env vars or rails cache
- Better rescue from Psych as the serializer
- Add randomization to loaded jobs to stop them stepping on each other quite
  so much with a lot of runners and not many jobs