shlib.sh: refactor bang into bang plus bang_catch
Put the bulk of the "bang()" function into a new "bang_catch()"
function that does everything including setting bang_errcode to the
result but does not actually call bang_failed on non-zero result
codes.
Put the test for a non-zero result code into the "bang()" function
itself thereby allowing clients to choose to use the "bang_catch()"
function instead in order to reap all the benefits of "bang" logging
etc. while still being able to trap a non-zero result code.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>