Addressed Jython compatibility issues; Jython does not support os.getpid().
Replacements were implemented for bson/objectid.py and pymongo/pool.py.