Remove device change deduplication based on device id.

It looks like some software changes internal flows instead of
changing the device id.  In place of this deduplication logic
I've added a rate limit of 1 change per 250ms, which is enough
to fix the original issue of multiple events.

Also fixes an issue where we were firing device changes four
times (!) --[eRender, eCapture] * [eConsole, eCommunications].
The AudioManager only supports output device notifications so
we should only be firing the listener callback for eRender.

With the rate limiting logic and only firing notifications for
eRender, this takes us down from four device changes to just
1 for unplug / replug of a device.

BUG=506712
TEST=device changes work, single stream created per multiple events.
TBR=henrika

Review URL: https://codereview.chromium.org/1248543002

Cr-Commit-Position: refs/heads/master@{#339815}
3 files changed