add sample_routing_listener.rb

Putting this in a public place for easy use.
<sample routing listener> bug 1043394 + other minor fixes