Profiling ferite scripts

This enables profiling of ferite script. It records the time spent in statements and functions.