Clean up lots of minor things in SurfaceFragment

* Use isNull() to check for null fragments
** Update isNull() to check for !this.range
*** We were previously checking for !this.surface, but this.surface && !this.range is also possible
** Add null handling where missing
** Return a clone rather than this for null fragments in methods that return a new fragment
* Move willAutoSelect() and setAutoSelect() to a reasonable place and near each other
* Add clone() and implement methods that return new fragments using clone()
** This reduces the duplication of constructor parameters
* Break out range translation into getTranslatedRange()
** Use this in update()
* Add a change() method that calls surface.change() and autoselects if needed
** Use this to eliminate lots of !this.noAutoSelect && tx.translateRange duplication
** Get rid of lots of local tx variables that are no longer needed
* Document that getSurface()/getDocument()/getRange() can return null

Change-Id: Icb0c497290fa26db94f53fc859c08e37f99aee15
Add excludeInsertion to translateRange()

This allow us to deviate from the default behavior of including an
insertion that occurred on the range's boundaries.

excludeInsertion=false would translate Foo|Bar|Baz to Foo|BarNew|Baz

excludeInsertion=true would translate Foo|Bar|Baz to Foo|Bar|NewBaz

Change-Id: I592d0025e58e81698a00699c9fa69c4fe31e60bc
Add excludeInsertion property to SurfaceFragment

If set to true, this causes automatic range translations to exclude insertions.
This mode can be enabled and disabled using a setter, just like noAutoSelect.

Change-Id: I2e9b1b97e10c12fa8471f0d77dda17458ac65591
Exclude insertions in ve.dm.SurfaceFragment#isolateAndUnwrap

In cases where the separators we insert are adjacent to the range
we're isolating, we don't want the range to grow to include these
separators, as that breaks the subsequent unwrap.

This range growth doesn't usually happen, because the typical situation is:
[</list><list>]<li>|<p>Foo</p>|</li>[</list><list>]
(i.e. the list is being split but the listItem is not), but it's possible to get:
[</list><list>]<li>|<p>Foo</p>|[</li></list><list><li>]<list><li>...
when converting a list item that contains a nested list, in which case the
listItem does get split.

Bug: 63209
Change-Id: Iec3fecccf5d4ad545164f36ee73b7285f29c0e55
Merge "Clean up lots of minor things in SurfaceFragment"
Merge "Add excludeInsertion to translateRange()"
Merge "Add excludeInsertion property to SurfaceFragment"
Merge "Exclude insertions in ve.dm.SurfaceFragment#isolateAndUnwrap"