micro-optimization for xpaths

Don't compute the XPath for each node by traversing up every time.
Instead, track it as we traverse.

Showing ~10-15% improvement in Chrome and FF.
Updated generated files after merging tilgovi's optim. branch
- Improved internal error handling
- Worked around some FF selection bugs
Added one more workaround for a Chrome selection API bug.
Work around yet more selection errors
Picked a few changes from the 'unbreak annotator' project.
Removed some obsolete debug output
Removed generated files.
Merged changes from master branch
Fixed some merge issues