Cherrypick from 'ai-alarms'

Refactoring and clean-up of alarm code for AI and robots.
Merge pull request #4998 from mwerezak/camera-alarm-cleanup

AI and cyborg alarm code cleanup