SIGN IN SIGN UP

Improve flutter_tools handling of the device being unplugged while syncing DevFS (#9431)

- [x] Catch SocketErrors and handle them gracefully.
- [x] Print 'Lost connection to device' when the service protocol connection is severed unexpectedly.
- [x] Print 'Application finished' when the application exits otherwise.

After this PR:

```
Launching lib/main.dart on Nexus 7 in debug mode...
Running 'gradle assembleDebug'...                     1.2s
Built build/app/outputs/apk/app-debug.apk (21.7MB).
Syncing files to device...
Application finished.
DevFS sync failed. Lost connection to device: SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 53062
Could not perform initial file synchronization.
```

Fixes #6705
J
John McCutchan committed
acd75c0a3b5df9e6cda76999be2bb98167e4c571
Parent: b645e4e
Committed by GitHub <noreply@github.com> on 4/17/2017, 10:35:01 PM