Can test a DB connection before saving it.

The UI doesn't ignore a cancelled test, alas, so I'll have to deal
with that at some later point, maybe keeping a reference count or
something.