Splitting stats_profiler into two

Stats profiler now split into two files: function_profiler.py and
handler_profiler.py
Will now only initialise one or both if config file has values for
'functions' or 'handlers' keys.