With this patch we can now access resource metadata through the 'metadata'
attribute and have it always fetch the latest data from the database. This
reduces the chance of accidentally accessing stale data (due to the
metadata being updated in a different database session via the metadata
server) by providing a single implementation to access it through.