Fix unserialization of function type in json.
Extend IDatabaseClient interface.

* Now also can save the document passing dictionary.
* Posibility to pass extra options to get_document(), to get it in raw
  format or with conflicts info.
Implement method merging update logs to resolve conflicts.