shx system functions should return, not exit

It was not easy to discover what functions of shx returned or exited.
Let's keep exit to shx_fatal and obvious functions and let the others
return non-zero codes, so shx user can choose whether or not he wants to
exit.
Use shx_warn instead of echo ... > /dev/stderr
Move shx_priv_trapint function to shx.sh