Fix : profiling breaking on notice/warning/error

 - Profiling works correctly if a plugin causes a warning, a notice or an error (Previously, it broke on error)
 - Profiling displays errors only if _PS_MODE_DEV_ is enable (Previously, it override error managment)
 - Removing obsolete functions