Add parent(), next() and prev() methods to AST nodes
Simplify pure-js additions to Document class