adb: create shell protocol class.

Adds a new class ShellProtocol to help read and write data with
`adb shell`. This will allow splitting streams and sending out-of-band
data such as exit codes.

Nothing uses the new class yet except the unit tests.

Bug: http://b/23030641

Change-Id: Ieb02e127095c6dda25b7cb188a2e599173fd97e6
4 files changed