Infer.Internal: Export Traversal's for Refs
Add (unused) optimizeContext function
Don't recurse all the depth in unify every single time just for cycle detection

Deref can fail with cycle error too

On my machine, this improves the benchmark's performance

FROM:
factorial: 5.5 ms
euler1:    9.1 ms

TO:
factorial: 4.7 ms
euler1:    8.0 ms

For reference, the old inference engine was:
factorial: 6.0 ms
euler1:    8.8 ms