Squashed patches

@Sirupsen @dylanahsmith @csfrancis @burke 

As part of our resque cleanup push, I've squashed down all of our various commits on top of upstream with the goal of making each commit we carry a stand-alone, coherent patch. This should make it easier to see what changes we actually carry, and it should make it easier to do rebases if upstream ever pushes a new stable version.

In theory this branch is code-identical to master. Please primarily review to check that I haven't misplaced or mis-categorized a commit. If you have any other information on a patch, let me know and I will add it to the commit message for posterity.