updated transitions API for better error handling. WIP medic/medic-webapp#714

When error is returned by a transition save the error on the doc and
false on the `transitions[key].ok` property.

Also:

Removed `completeSetup` argument on attach since it's not used.

Added `_hasConfig` to conditional_alerts transition so it only runs and
makes changes when configured.

Fixed bug in update_sent_by transition, it never ran because the doc
property wasn't present on the view results.