Define hstore metadata method once

Moved the definition of the `"hstore_metadata_for_#{hstore_attribute}"` method out of the each block so it only happens once.