Fix a bug introduced in rev.1.43 (moving command processing to the end of the event loop). The change apparently broke the dead session removal logic resulting in a potential segfault and maybe some other nasty effects. Instead, restore loop order to pre-1.43 state, just move out command processing out of the loop explicitly.
Fix a bug introduced in rev.1.43 (moving command processing to the end of
the event loop). The change apparently broke the dead session removal logic
resulting in a potential segfault and maybe some other nasty effects.
Instead, restore loop order to pre-1.43 state, just move out command
processing out of the loop explicitly.

Put more comments here and there while I am at it.

Reported by:	Nils Ohlmeier <nils@iptel.org>
Sponsored by:	Sippy Software, Inc. ( http://www.sippysoft.com/ )

DrumTechnologiesLtd/rtpproxy,DrumTechnologiesLtd/rtpproxy,miconda/rtpproxy,dsanders11/rtpproxy,miconda/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,kiryu/rtpproxy,sippy/rtpproxy,gtkiller/rtpproxyd,miconda/rtpproxy,hongbinz/rtpproxy,dsanders11/rtpproxy,gtkiller/rtpproxyd,jevonearth/rtpproxy,viraptor/RTPproxy,jevonearth/rtpproxy,hongbinz/rtpproxy,DrumTechnologiesLtd/rtpproxy,Vocalocity/rtpproxy-pre,dsanders11/rtpproxy,hongbinz/rtpproxy,synety-jdebp/rtpproxy,mab-netdev/rtpproxy,Vocalocity/rtpproxy-pre,sippy/rtpproxy,sippy/rtpproxy,viraptor/RTPproxy,mab-netdev/rtpproxy,mab-netdev/rtpproxy,Vocalocity/rtpproxy-pre,synety-jdebp/rtpproxy,Vocalocity/rtpproxy-pre,hongbinz/rtpproxy,kiryu/rtpproxy,synety-jdebp/rtpproxy,kiryu/rtpproxy