Fix android multiple devices: android/android-common.js
native instruments configurable as capabilities
Support full-reset for selendroid

Replay commit ad9c73a3c45cfa8352dac2e5b7943a19b615b14b
Merge pull request #1753 from patotskiy/fix_android

Fix android multiple devices: android/android-common.js
Merge pull request #1754 from sebv/extra-caps

Native instruments configurable as capabilities
Merge pull request #1755 from mobiware/full-reset2

Support full-reset for selendroid (2nd take)
Implementing mobile:background command for Android and Selendroid

Replay commit 1c6b495cd2f3fbbb8622a9fb43f3e50aa79ab82e

Remove debug log

Tidy up spaces according to pull request review

Fixed indentation according to Appium project style guide (2 spaces indent)

Fixed error management in background method

Add an argument to ADB.startApp in order to choose whether to stop the app prior to starting it

Refactored mobile:background method for Android: using ADB.startApp rather than directly issuing am start command to ADB shell, do not return to callback until app is back to foreground

Mimick the launcher start intent for the app when starting it

The Android launcher uses the following settings to start apps:
- MAIN action
- LAUNCHER category
- FLAG_ACTIVITY_NEW_TASK
- FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
Without those settings there were discrepancies between Selendroid and
Android when trying to bring the app back to foreground: it would not
bring back the existing Activity stack but create new activities

Add retry argument to startApp

Missing space

Removed remaining conflict markup

Merge branch 'master' of https://github.com/appium/appium into background-android2

Fix lint error (replace tab with spaces)
Merge branch 'master' of https://github.com/appium/appium into background-android2
Merge branch 'background-android2' of https://github.com/mobiware/appium into background-android2