Refactor PathFlattener code and add maxRecursion and tolerance arguments to constructor.
Rename PathFlattener to PathIterator and include the class in exports.