simplified iterator implementation
Update Profiler.php
Updated tests
Added check in getDuration
Fixed tests
Fixed for v5.4
Merge pull request #5 from potfur/simplify-profiler

simplified iterator implementation