Allow using nil for smart localhost api_uri

This will first try the new 15762 port, and then fall back to the legacy 55672 port.

This is primarily needed for handling the fact that we still run RabbitMQ 2.x systems in production (and thus developers should run that locally), while Travis only has support for RabbitMQ 3.x (>= 3.3).