Adding DOM formula link

Enabling the parser to evaluate DOM formulas using ID or
data-formula-ref attributes. Currently chain formulas are being
evaluated but circular references are not being recognized and will
result in "out of stack space" exception. Adding a few tests as well.