* I found that sometimes ADB can't find the device even after running `adb kill-server`
* The problem was that it was loaded using Fastboot and emulator doesn't always show up as online
* Fixed by closing emulator and then doing coldboot
* Some problems with parsing `{protocol: <protocol>, value: <value>}`
* `(!_.isNil(driverRes.value)` was incorrect check because `value` can be undefined or null; replaced it with `_.has(driverRes, 'value')` to check that the `value` property was set
* ```
if (driverRes.value) {
driverRes = driverRes.value;
}
```
was also incorrect because `driverRes.value` may be false-y
* Moved logic into it's own function and then added tests to cover the problem cases
* Make it so executeCommand returns protocol and value/error
* This is so that base driver can read the protocol and serve the response (base driver doesn't know what the protocol of the inner drivers are)
* Added tests to confirm that it falls back to MJSONWP if an inner driver is not ready and handles concurrent MJSONWP and W3C sessions
* Updated unit tests to match the new format
* If`executeCommand` returns an object that has a property 'protocol' and either a 'value' property or an 'error' property, respond with the provided protocol
* If the object is of this form, than it came from another driver that knows what protocol is being used so we re-assign the protocol to whatever was reported
* Added to delay in the 'unexpected exits' test because I was getting a race condition
* Add common websocket handlers
* tune the default prefix
* Add integration test
* Tune the test
* Fix the functional test
* Tune socket import
* Address review comments
* Tune some expectations
* Previously, we were only checking the HTTP payload to see what protocol should be
* This is inadequate, in the case of drivers that don't proxy W3C Capabilities yet
* The fix now is to set the protocol in `createSession` to see if the W3C caps were proxied through, if they're not, set protocol to MJSONWP
* Added unit test and one e2e test to confirm that this works