CollectionSync: handle full sync of non-hierarchical RIDs

With non-hieararchical RIDs, we don't have the full parent chain available -
each collection only refers to RID of its parent, but we know nothing of the
parent's parent. To correctly match those, we need to compare only parts of
RemoteID chains.

Also this change makes sure that all transactions are comitted or rolled back
when an error occurs, so that we don't leave a transaction opened when something
goes bad.
CollectionSync: only work with relative RIDs in non-hierarchical mode
CollectionSync: don't delete local collections in case of empty incremental sync
CollectionSync: start local fetch after delivery is finished

Otherwise with streaming enabled, we could end up with retrieving local
collections, but not yet having matching remote collections delivered from
user, which makes the algorithm to automatically enqueue the local collection
for deletion, if when the remote collection would arrive later.
CollectionSync: add some more debug outputs
CollectionSync: use single CollectionFetchJob

Instead of listing children for each Collection individually, we request all Collections
at once and then process them in one go. This means that the algorithm will require more
memory, but it will be much faster when dealing with large amounts of Collections.