Fixes #4340: Move r30942 to v1.7 branch (resolve a race condition)

---svn-pre-commit-ignore-below---

r30942 [[BR]]
Resolve a race condition when responding to a SIGTERM to ensure that any final message from the application is correctly output. Remove a duplicate command, reduce the priority of the daemon exit command to MSG so that the IOF will have a chance to output cached messages. Update the signal trapping test.

Thanks to Paul Kapinos for reporting the problem.

cmr=v1.7.5:reviewer=jsquyres:subject=resolve a race condition


r30980 [[BR]]
Add a comment to make Jeff happier...

Refs #4340