adb: refactor subprocess code.

Refactor shell_service.cpp to remove dependencies on service.cpp and
combine some common logic between PTY and raw subprocesses.

This will make it easier to add additional common code paths for
the upcoming shell protocol.

Change-Id: I497d30dd388de61b6e68d9086dce38f33dd92876
1 file changed