Database: allow branches to be 'diff'ed

We have 2 new APIs:
- Database.branch: creates a topic branch (really just clears the deleted row list)
- Database.diff: returns the deltas between a branchpoint and a topic branch
  using the same 'update' type already used by the database_callback mechanism

This patch renames (for cleanliness):
- 'type update' to 'module Update = struct type t = ...'
- 'Generation.null_generation' to 'Generation.initial'

Also add a (passing) unit test.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>