Added optional attach functions that take a mutex parameter

Even after wrapping all hiredis functions, there still needed to be a way to block indirect access to the redis async context by the event loop.

This solution preserves the old attach functions and behaviour (without a locking penalty) while enabling a pthread mutex lock around redisAsyncHandleRead and redisAsyncHandleWrite when needed.