New fix for instance_activate_object and subclasses, done at the object level

This pull request fixes the bug reported in https://github.com/enigma-dev/enigma-dev/pull/878 and #753
It takes Josh's recommendations into account, and uses object inheritance rather than a global switch function.