Don't attempt to connect to nil/empty :gateway

The current code creates a new `GatewayConnectionFactory` if `:gateway` exists, rather than if it has a value. This is a minor change to amend the `connection_factory` method to only initiate a gateway connection if `:gateway` exists, is not nil and is not empty.

For my particular use case this then allows me to define `:gateway` as a block which can respond to different environments or configuration tasks - returning `nil` if no gateway is required.