revert most of http://hg.rabbitmq.com/rabbitmq-server/rev/5fddc5198854
since it was wrong. except for the var renaming in r_queue_consumer:add.
merge bug25938 into default