Use a smarter comparison of annotations when creating open/close tags

Currently we just compare by store index, but a bold annotation
with data-parsoid attributes set should merge with a new clean bold
annotation. Similar rules apply to link annotations.

Bug: 48110
Change-Id: I93586919002c78732228e08b134e67e1a94f8ad7
Merge "Use a smarter comparison of annotations when creating open/close tags"