Use strict comparison for insertionAnnotationsChange

74fc34ac changed the condition for emitting insertionAnnotationsChange
from a.containsAllOf( b ) && b.containsAllOf( a ) to a.compareTo( b ).
The containsAllOf test was stricter: if b contains an annotation
that is comparable to one in a, but not the same, the containsAllOf
test would fail, but the compareTo test would succeed.

This caused a bug with annotations with htmlAttributes. If you edited a
document containing <b>Foo</b> <b class="y">Bar</b>, placed
the cursor at Fo|o, typed "x", then placed the cursor at Ba|r,
and typed "x", you would expect <b>Foxo</b> <b class="y">Baxr</b>,
but you'd get <b>Foxo</b> <b class="y">Ba</b><b>x</b><b class="y">o</b>.
This happened because the insertionAnnotations were set to <b>
when you put the cursor in "Foo", and were not changed when
you put the cursor in "Bar" because <b class="y"> is comparable to <b>.

Even the original containsAllOf test wasn't strict enough, because
it didn't take order into account: it would consider [b, i]
the same as [i, b], so you could still get the same broken behavior
with <b><i>Foo</i></b> <i><b>Bar</b></i> (although that seems to
be straightened out by the openAndCloseAnnotations() in the
converter in practice, but it was still being put in the DM wrong).

To fix both of these problems, use ve.dm.AnnotationSet#compareToStrict
which checks for exact equality: equal store indexes in the same order.

Change-Id: I2cb9ab66cc6e0933134cd313fe30d7d88e0844de
Merge "Use strict comparison for insertionAnnotationsChange"