Fixes #6177 - refuse to deactive plugins used as dependencies
whitespace fix
move deactivate event registration to the user-triggered action
Revert "move deactivate event registration to the user-triggered action"

This reverts commit 6da43b70ca0de807c0532adb0bba65405d3ffbc1.
Added comments regarding deactivation due to error
Refs #6117 - Added docs + changed plugins_deactivate_dependency_check to _plugins_deactivate_dependency_check
Merge pull request #6185 from Srokap/ticket_6117

Fixes #6177 - refuse to deactive plugins used as dependencies