Extract Rid from Body outside handle_stream_event
Identify handlers - handling new requests
Support `wait` BOSH parameter

This uses handler identification started in previous commit.