make metadata storage pluggable

sometimes we create the index as part of the table creation statement, sometimes we use this method.
I think it makes sense to leave it as part of the table creation statement, since it may become too unwieldy if we need to tune indices.