Implement RecursiveTreeIterator

Used mostly php-src to build this.

Some function change the error handling to exceptions. I didn't include that due to problems in the runtime restoring them

These functions are
 * __construct
 * getEntry