This change adds ttl index to last_sample_timestamp field in resource
table, so data cleans in background after time to live is expired with
low priority and without blocking database, instead of reduce operation.
Change-Id: I13e336a9ad0d771962bf81a33818b4b233ae3e51
Closes-Bug: #1270779