Move handling of missing table outside of do_query
Move handling of missing table outside of do_query

This is more consistent with other DB migration code and reduces indent
level in the meat of the query.

Change-Id: I536a8425f7e9f3dd95eacad783e1b7d7905b2b8d

swiftstack/swift,openstack/swift,tipabu/swift,openstack/swift,tipabu/swift,openstack/swift,openstack/swift,swiftstack/swift,swiftstack/swift,tipabu/swift,tipabu/swift