Basic implementation of purely DOM-based separator handling

This patch set implements a DOM-based separator handling pipeline, but does
not enable it by default yet.

Each element handler can now define a sepNls object like this:

sepNls: {
    before: function(node) { if(node).... (logic).. return {min: 1}; },
    after: id({min: 1, max: 2}),
    firstChild: id({min: 1}),
    lastchild: id({min: 1})
}

The passed-in 'other' element node allows a customization of the result for
pairs of elements etc.

The code path can be exercised and seems to work ok, but is not yet used.
You can comment out the this.testHandleSeparator call in line 2926 to get some
debug prints.

Also, fix JSHint errors in WikitextSerializer and define proper exports in
defines in preparation of moving away from globals.

No change in parserTests, as the new separator code is not used yet.

Change-Id: Ie0aa7530918da9eb584f2039d49adceeb9f56f5f
Merge "Basic implementation of purely DOM-based separator handling"