Sync Gateway: misc updates
CB Server: fixed MB-9168