Restore resource metadata attribute

For backwards compatibility the Resource.metadata attribute
has been restored, however reading or assigning this attribute
will result in a deprecation warning.

Reading metadata will force a refresh from the database, which
maintains the previous behaviour rather than optimising for
performance.

Change-Id: Ifdcf3d98b99a09aac8755c84ef3f59d8602fc6a8
Closes-Bug: #1324704
Merge "Restore resource metadata attribute"