Debugger: refactoring, added detectDebugMode()
Debugger::detectDebugMode: added support for secret in cookie