Fix issues with transactions

At multiple points in the code, a `redis.Pipeline` is checked in a
boolean context to determine if it should be used instead of the
`redis.StrictRedis` client instance.

Example:

    p = pipe or self.redis.pipeline()

The issue with this code is that `redis.Pipeline()` implements
`__len__`, [which can be called in a boolean
context](http://docs.python.org/2/library/stdtypes.html#truth-value-test
ing). In the end, what the test does is determine if any command has
already been pushed.