[Profiler] Fixed bug and changed tests to pytest
This merge request introduces some changes to the profiler to fix the error in issue #1123 (closed). The profiler will not accept multiple stop() calls, so its behaviour does not change.
It also introduces a more comprehensive way to manage the status of the Profiler, using the status class as @bdepaula proposed and deleting the old flags.
Furthermore, tests have been adapted for pytest. Coverage is 100%.
Closes #1123 (closed)
Edited by Bruno de Paula Kinoshita