More work on ErrorHandler

Implemented log_error and changed set_debug_mode to activate_debug_mode
and created deactivate_debug_mode
Changed the reference to set_debug_mode in init.php to activate_debug_mode