improve performance of resource-list in sql

simplify the query to retrieve list of resources. it is much simpler
to query against raw Sample data then to join against Resource table.

also, add meter_links param to allow ability to disable link generation of
relate meters.

Change-Id: Ia4ceafc568c4a2e4c8e6b7586511135627b9335e
Closes-Bug: #1264434
Implements: blueprint big-data-sql