Test id-based invalidation.

This requires adding a test-only parameter to observeChanges that lets us turn
off time-based polling.