adds joint index on sensor and timestamp for scalar data
adds individual indices on sensor and timestamp to scalar data
now caches the total queryset count so only do the query once
Merge remote-tracking branch 'production/master'