Make retries in standalone driver configurable

Summary:
The value for the amount of retries for starting an emulator was previously
hardcoded. This diff adds an aption to the SelendroidConfiguration to configure
the amount of retries and adds test coverage for the retry feature.

For reference, this was the commit that introduced the retry logic:
https://github.com/selendroid/selendroid/commit/a12e5038f80fbed0a208d02a5f4e5926ee627e61

Test Plan: - run the tests (especially the SelendroidStandaloneDriverTest)

Reviewers: mkonicek

Reviewed By: mkonicek

Subscribers: dstroganova

Differential Revision: https://reviews.facebook.net/D28341
Passing through the output generated by shell command. Also logging it.
removed unnecessary brackets
Merge pull request #695 from operatiay/read_adb_output

Read adb output
Modifying selendroid-standalone argument -emulatorOptions to handle multiple options for emulator
Fix app crash handling, provide more debug output when it fails

Summary:
- The check for the crash log file was missing a forward slash at the end of the path (e.g. `ls /storage/emulated` instead of `ls storage/emulated/`)
- Add the output of `adb shell ps` in case the app crash handling fails to provide more debugging information (make it clear whether the process is still alive or not)
- Fix some random typos and extra whitespace

Test Plan:
- `mvn clean install`
- Ran one of the Facebook end-to-end tests.

Reviewers: ainsej, kumar.rangarajan, juyuan.yang.9, asm

Reviewed By: asm

Differential Revision: https://reviews.facebook.net/D28677
Added -keepEmulator option. Is set, selendroid server will keep emulator running after test ends.
Added -keepEmulator option. Is set, selendroid server will keep emulator running after test ends. Adding a unit test
Possibility to register at selenium grid hub as android browser if no AUT was used and AndroidDriverApp is available (see issue #3709 Mobile Web site does not launch with selendroid capabilites" at appium project)
Merge pull request #697 from frolix/master

Selendroid-standalone argument -emulatorOptions to handle multiple options for emulator
Don't use System.out.println() and Throwable.printStackTrace()

Summary: Printing to stdout is a really bad practice. Use logging which can be configured by the users of Selendroid as needed, e.g. hidden from the console and redirected to a file.

Test Plan:
  $ mvn clean install
  ...
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO]
  [INFO] selendroid ........................................ SUCCESS [0.137s]
  [INFO] android-driver-app ................................ SUCCESS [2.024s]
  [INFO] selendroid-server-common .......................... SUCCESS [1.013s]
  [INFO] selendroid-server ................................. SUCCESS [17.088s]
  [INFO] selendroid-grid-plugin ............................ SUCCESS [0.676s]
  [INFO] selendroid-common ................................. SUCCESS [0.914s]
  [INFO] selendroid-standalone ............................. SUCCESS [17.732s]
  [INFO] selendroid-client ................................. SUCCESS [0.633s]
  [INFO] selendroid-test-app ............................... SUCCESS [4.871s]
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------

Reviewers: ainsej, kumar.rangarajan, juyuan.yang.9, asm

Reviewed By: asm

Differential Revision: https://reviews.facebook.net/D28887
Adding config arguments maxSession and maxInstances so registration at grid would be more flexible
Fixed detection of screen resolution from skin name.
Merge pull request #703 from frolix/master

Selendroid-standalone: Fix to ScreenSize detection of emulators, and a feature - configurable maxSession and maxInstances
Prefix catch all error responses to make message recognizable

Summary:
It is currently hard to detect whether a test failed because of a legitimate
error by a developer or because something is going wrong in selendroid
internals. This diff marks error responses from the server that indicate
something has gone wrong in the internals of selendroid.

Test Plan:
```
$ mvn clean install
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] selendroid ......................................... SUCCESS [  0.105 s]
[INFO] android-driver-app ................................. SUCCESS [  2.107 s]
[INFO] selendroid-server-common ........................... SUCCESS [  0.890 s]
[INFO] selendroid-server .................................. SUCCESS [ 16.272 s]
[INFO] selendroid-grid-plugin ............................. SUCCESS [  0.826 s]
[INFO] selendroid-common .................................. SUCCESS [  0.968 s]
[INFO] selendroid-standalone .............................. SUCCESS [ 15.209 s]
[INFO] selendroid-client .................................. SUCCESS [  0.564 s]
[INFO] selendroid-test-app ................................ SUCCESS [  4.431 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
```

Reviewers: mkonicek

Reviewed By: mkonicek

Differential Revision: https://reviews.facebook.net/D28929
Update AUTHORS

Adding missing authors.
Add more logging to RequestRedirectHandler when session id is missing in request

Summary:
Add better error reporting in case a request comes in that contains no session
id.

Test Plan:
```
$ mvn clean install
...
[INFO] Reactor Summary:
[INFO]
[INFO] selendroid ......................................... SUCCESS [  0.123 s]
[INFO] android-driver-app ................................. SUCCESS [  2.377 s]
[INFO] selendroid-server-common ........................... SUCCESS [  1.005 s]
[INFO] selendroid-server .................................. SUCCESS [ 15.105 s]
[INFO] selendroid-grid-plugin ............................. SUCCESS [  0.595 s]
[INFO] selendroid-common .................................. SUCCESS [  0.834 s]
[INFO] selendroid-standalone .............................. SUCCESS [ 16.157 s]
[INFO] selendroid-client .................................. SUCCESS [  0.541 s]
[INFO] selendroid-test-app ................................ SUCCESS [  4.496 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
```

- Ran one of the Facebook e2e tests

Reviewers: mkonicek

Reviewed By: mkonicek

Differential Revision: https://reviews.facebook.net/D29193
Fix race condition in ServerInstrumentation.finishAllActivities()

Summary:
The `.finishAllActivities()` method did not run on the main thread when
a session got deleted. The activities that are finished are coming from
the `activitiesReporter` which also reports (and removes) activities
that were destroyed. If these things are running on seperate threads,
race conditions may occur sometimes.

Test Plan:
- Ran one of the Facebook e2e tests
```
$ mvn clean install
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] selendroid ......................................... SUCCESS [  0.115 s]
[INFO] android-driver-app ................................. SUCCESS [  2.056 s]
[INFO] selendroid-server-common ........................... SUCCESS [  0.895 s]
[INFO] selendroid-server .................................. SUCCESS [ 15.418 s]
[INFO] selendroid-grid-plugin ............................. SUCCESS [  0.703 s]
[INFO] selendroid-common .................................. SUCCESS [  0.901 s]
[INFO] selendroid-standalone .............................. SUCCESS [ 15.368 s]
[INFO] selendroid-client .................................. SUCCESS [  0.540 s]
[INFO] selendroid-test-app ................................ SUCCESS [  4.674 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
```

Reviewers: mkonicek, ainsej, krishnakumar, juyuan.yang.9

Reviewed By: mkonicek

Differential Revision: https://reviews.facebook.net/D29199
Corrections to JSON to register at Grid hub.
Fix 'error: cannot find symbol' error

Summary: This slipped through in another diff. :/

Test Plan:
```
$ mvn clean install
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] selendroid ......................................... SUCCESS [  0.103 s]
[INFO] android-driver-app ................................. SUCCESS [  1.962 s]
[INFO] selendroid-server-common ........................... SUCCESS [  0.823 s]
[INFO] selendroid-server .................................. SUCCESS [ 14.917 s]
[INFO] selendroid-grid-plugin ............................. SUCCESS [  0.569 s]
[INFO] selendroid-common .................................. SUCCESS [  0.826 s]
[INFO] selendroid-standalone .............................. SUCCESS [ 15.737 s]
[INFO] selendroid-client .................................. SUCCESS [  0.532 s]
[INFO] selendroid-test-app ................................ SUCCESS [  4.301 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
```

Reviewers: mkonicek

Reviewed By: mkonicek

Differential Revision: https://reviews.facebook.net/D29241