queue: replace rabbitmq/amqp with redis/rq

* Removes amqplib.

* Adds redis/rq.

* Replace all code that push async tasks.

* add an @async decorator that turns functions into async tasks and
  cleans up after the job (modeled after celery, maybe a bit fragile
  as an API).

* Adapt the background process an rename it to 'worker'.
Refactor @async decorator, set config from worker

* Set a config value in the worker that can be testeted
  and cleanup the Session if in worker.
* Leave async.enqueue() to be able to push a function into the
  queue if in worker.
* Adjust code to call functions directly, not the .enqueue()
  method of the decorator.
Refactoring: rq settings, split out paster timer command

* Bundle all functionality related to rq/redis config handling into
  a new class .lib.queue.RQConfig
* Factor out the code that creates timed jobs into .lib.cli.AdhocracyTimer.
  Add tests for that.
* Create a seperate paster command 'timer' that uses AdhocracyTimer.

I tried to keep the timer and the worker in one proces. The timer
worked well inside the worker process and (still) has redis based
locking. Only one of many timers will schedule jobs. But for some
reason the rq worker locks up after some jobs if the timer thread is
running in the same process, even if both use distinct redis
connection objects.  The rq worker forks a work horse to execute the
job. After several jobs it gets stale.
Fix calls to post_update which was renamed to update_entity
paster timer: Add the entry point to the command
Move rename the tests queue.py to test_queue.py
Port commits from redis branch from adhocracy.buildout

Port the following commits to the new buildout structure inside the main
adhocracy repo:

liqd/adhocracy.buildout@3a7e0f65179bf603bb0f1239497deeabacff88fb
Install redis and configure the redis server

liqd/adhocracy.buildout@14c8eca60307429dff5790e1cd1c927ca1321120
Add section to install rq scripts

liqd/adhocracy.buildout@c4c499c53d05fd21144e1f6f5b68629a79e70b83
Remove the amqp leftovers. bye bye

liqd/adhocracy.buildout@67dd48286a26f5e8bef272f13b651eefded764a7
Tweak redis config
Upgrade redis, redis-py and rq to newest versions

* Update redis from 2.4.14 to 2.6.10
* Update redis-py from from 2.4.13 to 2.7.2
* Update rq from 0.1.2 to 0.3.6
Fix fake_job method name

FakeJob is supposed to work in cases where redis isn't available.

Unfortunately, this doesn't work, as the `Job` constructor and other
methods has changed in newer versions of `rq`.

Fallback to `sync` if redis isn't available would be nice-to-have, but
isn't critical for the RabbitMQ replacement, as the availability of
RabbitMQ is currently mandatory as well.
WIP: First steps to caching with redis/dogpile.cache

Work in progress. The configuration is hard coded. Redis is only
used for caching tiles here. All caches using @memoize are broken
with this commit.

* Add dogpile.cache as a dependency.
* Add a class CacheTagging that collects the tagging and key
  generation code.
* Write a key generation function to path to the dogpile cache
  region that also associates the cache keys with the tags for
  entities and stores that in redis.
* Do not hash keys and tags anymore. Redis has no size limit for keys
  (unlike memcached). The performance panality is small and clear text
  cache keys can be inspected and debugged by humans.
* Subclass dogpile.cache.backend.redis.RedisBackend to get debug
  messages.
* Configure a cache region in .lib.cache and use it to cache tiles.
* move the invalidation functions from .lib.cache.invalidate
  to .lib.cache.
Remove b/w compat clear_tag()
Refactor CacheTagging to CacheTaggingManager

* Rename CacheTagging ot CacheTaggingManager.
  * Use and instance instead of the class.
  * Move code that manipulates redis to dedicated
    functions.
* Add tests.