CRAS: cras_client: Add cras_client_create_with_type API

Add cras_client_create_with_type API for clients to open a client
connecting to specific socket.

Extract CRAS_CONNECTION_TYPE to `cras_types.h`.

Add a new option `--connection_type` to cras_test_client for testing.

BUG=chromium:937765
TEST=cras_test_client --connection_type 1 -P /dev/urandom
TEST=cras_test_client --connection_type 1 -C /dev/null (This should fail.)

Change-Id: I227b9ef2f1a2dff46ba3025b7e9ca37c75fc1dbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/1833361
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
5 files changed