MDL-48107 tool_monitor: prevent site rule removal when deleting a course
MDL-48107 tool_monitor: extended automated tests

Also adjusted them so they will pass with these changes