NEXUS-6094: Staging Mojos made aware of build failures

Reworked and simplified previous commit, and added user ability
to control failure detection.