device: ac97: Cleanup interrupt logic
device: ac97: Cleanup interrupt logic

- Send only one event while re-sampling.
- Don't sent event if the new sr is identical to the old one

This can reduce the rate to trigger the issue.

BUG=chromium:937977
TEST=Build and run lots of aplay and arecord in guest vm

Change-Id: Ibd21f363076c977ae256079e2615094b7ed2408b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1840752
Tested-by: Chih-Yang Hsia <e09ac2debfefa3666e69a4e41e179a1517e8fddf@chromium.org>
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Daniel Verkamp <72bc170b46ec491f7bdd4359a1c0bfed274de40c@chromium.org>
Reviewed-by: Dylan Reid <c791bfe44996c1eed9c7149a0c5f12a86d58eb85@chromium.org>
Commit-Queue: Chih-Yang Hsia <e09ac2debfefa3666e69a4e41e179a1517e8fddf@chromium.org>

google/crosvm,google/crosvm,google/crosvm,google/crosvm