Refactor to store the location as metadata

Instead of storing the location of the tree node directly on the tree node itself it is now stored on a metadata object. This is in preparation of allowing storing other non syntax related metadata (such as comments) on the node itself.