Fixed nested samples percentage bug.
Added tree instances for sample history.
Fixed profiler wrong sample parent.
Profiler now uses ordered arrays instead of maps.
Updated tests and wrapup