bugfix: the shared dict would incorrectly get unref'd for multiple times when the lock() and/or unlock() methods are called more than once. thanks Peng Wu for the report and Dejiang Zhu for the patch in #3.