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 (cf. http://docs.python.org/2/library/stdtypes.html#truth-value-testing). In the end, what the test really does is determine if any command has already been pushed to the pipeline.