switching out mutex implementation

 * using a mutex/lock setup based on redis' blpop and getset atomic
   functionality
 * updated tests accordingly
 * updated imports