Only load UUID extension on UUID failure

Before this commit, the UUID extension was being loaded on every
connection. This not only was inefficient, but it spammed the error log
every time you connected to a database. This commit fixes both of those.
Stub DB connection in unit test

We don't need to actually communicate over the network to check that an
attribute is set.