Add tests for ve.dm.Document.getNearestWordBoundary

Also in this commit is a minor fix to the regular expression so it
behaves as documented (the hyphen needed escaping).

Bug: 44085
Change-Id: Idc315e2dce79be8f028b5681c60f74e175b9d869
Merge "Add tests for ve.dm.Document.getNearestWordBoundary"