Merge latest changes from internal repository

Bug fixing and performance improvements.
Mapping from database values to java objects is now using oids.
New feature: GlobalObjectMapper. This allows us to map "proprietary"
classes into database values and vice-versa.
Added support for: com.google.common.base.Optional".