Add AutoSavepoint database utility

Savepoints, unlike transactions, can be freely nested. They can be used
when inside a normal BEGIN/COMMIT transaction or independently, and in
the latter case will behave like a normal transaction.
[libcommhistory] Add extraProperties API to Event

Extra properties are arbitrary key/value properties that can be attached
to an event. They're intended to be used for temporary or uncommon
values attached to an event, since they are more expensive to query. The
immediate use case is certain MMS-related properties, and it will also
replace some of the less commonly used properties of Event.

A database flag is used to avoid the query overhead when no extra
properties exist on an event.
Merge branch 'event-extraproperties' into next (#72)