Handle additional target cases.

If name is found by finding the engine key, look to see if a target is
specified for that key before falling back on `db:$key:`.

Then check to see if the name thus found is a URI or a name.