Bug 1079528 - Simplify queue-owner detection.

Since we use a standard queue-name format, we can use that
to determine the owner rather than looking for a connection.

Add test. Refactor some stuff. Add proper retry loop when
creating publisher.