CRAS: When setting new active node, disable all other nodes

Previously, new node selection would bail out early if the new node
was already active - this did not take into account that this might
not be the only active node, so other nodes remained active.
To be consistent with the case the new node was not active previously,
when all nodes but the new one are disabled, make sure that
the new node becomes the only enabled node when it's enabled using
SetActive*Node method.

BUG=chromium:672665,chromium:679852
TEST=Using chrome.audio apps API, (where A, B are ID of distinct
    existing audio nodes):
        setActiveDevices([A]);
        setActiveDevices([A, B]);
        setActiveDevices([B]);
    Verify that only audio node B is enabled.

Change-Id: Ic602d31183286caa36dd16e2ae8ec6ef03791f68
Reviewed-on: https://chromium-review.googlesource.com/427043
Commit-Ready: Toni Barzic <tbarzic@chromium.org>
Tested-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
2 files changed