Implement resource policy plugin using libresourceqt.

This contains a new resource policy plugin, replacing the built-in
code that was deleted when the plugin interface was removed in
138242fb2dc19438a0ead34b36af848800e27190 (which unfortunately did not provide a
plugin).

Change-Id: Iae7ed6edc330c69ca0c72d50bde6c7e12b8cca4e