Small refactoring of Collection/Cursor

The methods _unserialize and _transform_outgoing_document must live in the
namespace of Collection, not Cursor.

Signed-off-by: Martin Richard <martius@martiusweb.net>
Objects cache

The ODM now supports a simple caching feature based on the id of the documents
saved and/or retrieved.

The cache can be set localy to a collection or globaly. It is easy to disable
caching temporarily.

A few bugs and issues may have been fixed in this patch, and some comments may
have been slightly refactored.

Signed-off-by: Martin Richard <martius@martiusweb.net>