Port of 97882f796c0e8969c606ae723d14b6b443e2e2f9

This patch ports 'Unifies how BadStoreUri gets raised and logged' to
glance.store

Change-Id: Ifa638ebdc9c53ea57bd12d33c9df9a78202a681f