Make creation of connection depend on setting

If CREATE_NEW_CONNECTION_IFMISSING is True,
A new connection will always be created if
(identity, backend) pair is missing in DB
other wise we default to any matching identity
Clean up to PEP standards