Cherry-pick of v0.30.1 hotfix (ec3bc9f). When _cleanup_dead_intervals
compacted group lists but no groups became fully empty, the index retained
stale interval_index values pointing past compacted list ends, causing
IndexError in _get_cached_intervals.
Now rebuilds the index whenever dead intervals are removed, even if no
groups are deleted.
Includes regression test for Issue #118 and updated touch operation tests
to reflect that GC now runs immediately after touch-only paths.
Closes#118
Impact: Eliminates IndexError crash for users with brand-new Tibber accounts
that have limited price history, where partial group compaction was most likely.