midis: Add client function to close fds on a device

A client may want to close all the fds on a particular device,
but not completely disconnect from other devices. This patch provides
a function which enables a client to close the server side of all
socketpairs it has with a particular device.

BUG=chromium:701005
TEST='cros_run_unit_tests --board=samus --packages chromeos-base/midis'

Change-Id: Iffb7615ab1d0e6fca7b782130b565be66a8b591a
Reviewed-on: https://chromium-review.googlesource.com/609281
Commit-Ready: Prashant Malani <pmalani@google.com>
Tested-by: Prashant Malani <pmalani@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
7 files changed