Threadysafety

Resolves #5.  

Add a stripped down version of rlockobject from py3 (made compatible
with python 2) to ensure the cache is updated in a threadsafe manner.
This largely boils down to locking around attempts to add/get/delete
items from the cache dictionary since these may result in python byte
code execution.