Avoid module scope penalty

Python can't compile to STORE_FAST/LOAD_FAST in module scope, since all
assignments must affect the module's dict. So wrap the whole mess in a
function. Recovers another 33k/sec to the random get tests
Merge branch 'master' of github.com:dw/py-lmdb