Refactored implementation of local deletions.

Handling of pending deletions (for replication) is done by a store adapter.
Replication implementation has been straightened and augmented with comments.