Make getDataFromDomRecursion() use a context stack to pass context info

This will allow toDataElement() functions to just call this function
with a DOM element, rather than having to have all the recursion context
data to pass in.

Also expose this information using getters.

Change-Id: I89574c42385267e08704f018c0892d63014376a6
Merge "Make getDataFromDomRecursion() use a context stack to pass context info"