Added try/catch and promise failure callbacks in the view model module.

All places where the view model module calls into user code are now
guarded for failure, log errors and prevent activation/deactivation
where appropriate.