Sync master with php resque master

This pull request includes a lot of small fixes and some larger ones.

* makes master branch compatible with php-resque's master branch
* adds a small patch that addresses a php > 5.5 issue (see issue #61)
* cleanups
* permission fixing

It should not break anything.