Make BookmarkNode type immutable

BookmarkNode types are currently mutable and either set with a
set_type() method or inferred from URL validity. This CL changes this
set-up so that type is defined within the constructor and remains
unchanged throughout the existence of the BookmarkNode. This is not only
more coherent with the concept of type itself, but also removes the
redundancy of calling set_type() after having instantiated a
BookmarkNode whose type was already automatically set to the same thing.
It also rectifies certain incoherences within other parts of the code,
such as the need to re-set permanent node types after decoding them,
which had previously caused the BookmarkNode type to be changed to
Folder.

Objectively, this CL does the following:
1. Changed the main BookmarkNode constructor to take in a type instead
of calculating it internally.
2. Changed helper BookmarkNode constructors that take in less parameters
to compute node type within them based on URL validity.
3. Additional helper BookmarkNode constructors were added to allow for
the creation of nodes with explicit type but not every other parameter.
4. Changed the BookmarkPermanentNode constructor to always take in a
type instead of inferring it from other pieces of information.

Bug: 980301
Change-Id: Iafb32cbb4c4324f39d505761b3304e6ddaaca807
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1683850
Commit-Queue: Pauline Leitao <psivieroleitao@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675582}
16 files changed