Added close() method to Cursor objects, also made them thread-safe.