argument checking for protocol sender.

There may be a hard-to-reproduce bug in the code where it tries to send
to an uninitialized host with and invalid UPID. Add some checking to
catch that problem early and report it.
Tweak managed bus shutdown.

Rework the poison pill logic a little bit to provide a more stable shutdown
of the managed bus.