Fixed Jython 2.7 compatibility issues that arose from using os.getpid

...().

Replacements were implemented for bson/objectid.py and pymongo/pool.py.