[qtcontacts-sqlite] Optionally allow non-durable updates

In order to reduce the IO impact of regular updates, allow some
updates to be made non-durable, by applying the changes to a shared
memory cache rather than to the database itself. Presence-only updates
are now non-durable, since presence state information is typically
invalidated by reboot in any case.

The shared memory cache is managed as a table of per-contact detail
lists. When reading a contact, if there are details of any given type
in the memory cache, then the details of that type in the database
are obsolete.  If an update is effected that requires changes to the
database tables, then the memory details are removed, and the DB
values are current once again.  If a detail type is not stored in the
cache, then the table values are always up to date.
Remove unused function
[qtcontacts-sqlite] Fix the definition of initial process

Initial process should apply to any process that connects to the
contacts database when no other process is connected.  The previous
implementation would also be true for the next process to connect after
the process that previously held the initial process state exited.
[qtcontacts-sqlite] Attempt to fallback to previous SHM generation

When attempting to connect to the current generation of the shared
memory region, if the current region does not exist, look for the
preceding generation.  If that exists, it is reasonably likely to be
similar to the current data, and preferable to restarting the
accumulation.

If the immediate predecessor is not available, each preceding generation
has a geomterically smaller proportion of the data, which is more
out of date - ignore the existence of these regions.
Merge pull request #154 from matthewvogt/shared-memory

[qtcontacts-sqlite] Optionally allow non-durable updates