factor out triggerInitialSyncDone, improve logging
make server HTTP logging easier to read
ensure we get local_changed() after all changes, even redundant ones

the triggerInitialSyncDone() logic depends upon this, in the case where
the client has initial data, but the server does too, and they happen to
have the same contents (but different encrypted versions)
fuss with profilename/refactoring, not sure it works