Eng 5956 sqlcmd stop on error reviewed

This is a replacement pull request for all but the latest commits on ENG-5956-sqlcmd-stop-on-error (already reviewed by Chris) plus 1 more commit singleed out for easy review (please do) prior to some refactoring.

The original ENG-5956-sqlcmd-stop-on-error branch (and pull request) was slightly corrupted by some follow-on changes that don't properly reflect this morning's agreements.

I will complete the change to support resetting the error handler in a separate pull request after the refactoring.