Refactor initial merge of sync bookmarks

No behavioral changes: various minor refactorings are introduced to
improve code readability and simplify future patches.

Bug: 978430
Change-Id: Iafca6dd38e3c918b35417cd1c65b17cc37ec03d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1917361
Reviewed-by: Mohamed Amir Yosef <[email protected]>
Commit-Queue: Mikel Astiz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#715403}
6 files changed