Autohide local nav bar when displaying remote video

Change-Id: I693bbc9c5fa9508496b924939a4b97c71512f846
Fixed socket management issue

If a client connected to a server, then quickly exited the activity
before the socketConnect async task completed, it would cause leave
the socket open indefinitely (which affected the proxy server
negatively).
Added a failsafe in socketConnect completion step to check if the
activity is finishing; if so, it disconnects and shuts down,
otherwise it continues as normal.
Use all available means to hide the local nav bar

Take advantage of the newer APIs in JB and KK for hiding the nav bar.
In particular, it will use the new "Immersive" mode added in kitkat
(details: https://developer.android.com/training/system-ui/immersive.htmlo)
if possible. Does not yet scale the video to cover the whole screen even if
using the kitkat mode.

Change-Id: Id02adcf2bf1fcf14021d06d14d2d9d9e70ab30fd
Improve touch responsiveness by setting TCP NO DELAY

Disabling Nagle's algorithm on the TCP socket helps improve the touch
screen input responsiveness on cellular links. The buffering could get
excessive at times without this causing significant lags and skips in
input that degraded the user experience.

Change-Id: Ia50a85ed026ff995cdffc496eb747ca659d982b3
Add logging for WebRTC signalling messages

Change-Id: I04e1c257cccd708ae70cfa23b878172c46eab68f
Fix audio volume issues and remove dead code

There was some extraneous code left over from the AppRTCDemo that was
causing some problems.

1) There was a block setting a wakelock for no good reason

2) A second block changed some settings in the audio manager. These had
the side effect of messing up the client phone's volume settings semi-
permanently (at least until reboot or the app was uninstalled).

Both sections are removed.

Change-Id: Ia59d8c35234758972b52cf94e8262ea5949ecb83
Fix screen orientation on tablet devices

Change-Id: Iac0bf010a8b28c3b0bfa2ea1536091a06d282eff
Update gradle build for new android plugin

Change-Id: I37ea698cccdbdc3643a07ed0674536a878be6e95
Improve ICE server parsing

Altered the ICE server JSON parsing to support all the likely known
forms and combinations of username, password, credential, and url.

Change-Id: I6563821d1118256ce7cfa3c52388c217aa1e3283
Update WebRTC to upstream v3.52
Bump version number to 1.3.2

1.3.2 since we've changed WebRTC versions. This requires a VM with
the ICE candidate receive and send code changed to use the id & label
field names instead of the old sdpMid and sdpMLine names.

Also, 1.3.1 was used by an internal build that wasn't released.
Incrementing the version number to 1.3.2 avoids confusion with that one.

Change-Id: Id7aa57ffa8e14b7dab7dee67fd436e3da4d6895d
Accept old and new WebRTC candidate message formats

Accept both the id / label as well as sdpMid / sdpMLineIndex
naming schemes for candidate messages.

Change-Id: If8a6e3d52df87efdae16249fd29ce78353904856
Updated ConnectionDetails to wipe session info

When using the ConnectionDetails activity to modify an existing
ConnectionInfo, we now wipe any session information associatedd
with that ConnectionInfo.
Updated client awareness of session expiration

Changed client code to read new Protobuf fields for session max
length and grace period. Changed database handler to store extra
session information and check for session expiration.
If a session is expired - either because it has exceeded its max
lifespan, or because it has exceeded its grace period for renewal
- the client will discard the session information.
Co-commits:
svmp-protocol-def
svmp-server

Change-Id: Ic66ef249fe92e08db83f627875ee6dca050e8a9f
Add x86 libjingle (3.52) .so
Merge background service branch

Commits merged:
 * 2affa35 Minor error handling updates
 * 5b9b7ab Improve ICE server parsing
 * 9273bbb Changed AppRTC activity disconnect
 * 70a6307 Updated ConnectionDetails to wipe session info
 * 67cbe5e Update WebRTC to upstream v3.52
 * 48699c1 Fixed location handling looper
 * ab9475a Fix screen orientation on tablet devices
 * 73225fd Moved message and location handling
 * 6b4745c Moved sensor handling
 * a0b11a3 Refactored performance measurement code
 * 0580a38 Cleaned up AppRTC client
 * 8ff43a6 Major class reorganization
 * 3fdc119 Refactored AppRTC code
 * 44649a3 Cleaned up DatabaseHandler
 * 268eb75 Updated client awareness of session expiration
 * a12807a Fixed issue disconnecting sockets
 * 038798c Abstracted state machine
 * a1c5b01 Fix audio volume issues and remove dead code
 * 82d4543 Move socket handling into the service
 * 4c4b148 Cleaned up AppRTC activity
 * 321696f Reformatted AppRTC code
 * 2c20232 Improve touch responsiveness by setting TCP NO DELAY
 * e32cf85 Use all available means to hide the local nav bar
 * a4ccc68 Fixed socket management issue
 * 4739903 Updated README to address configuration
 * 498cfb1 Updated UI elements for background service
 * 0c4493d Initial add of empty background service

Fixed merge conflicts in:
	AndroidManifest.xml
	build.gradle
	src/org/mitre/svmp/common/DatabaseHandler.java

The following were moved/delete. Need to manually check and reapply
any missing patches:
	src/org/mitre/svmp/AppRTCDemoActivity.java
	src/org/mitre/svmp/SVMPAppRTCClient.java

Change-Id: If1f8a004a2f93cd85bf6cfe4c915ce96df7fdfda
Remove extraneous old JNI lib

Change-Id: I44a27b8abbbf01121d3c539d354ef803c016caac
Added more error handling

Updated various files, added error and exception handling, prevented
different crashes that could happen in certain circumstances.
Debounce screen rotation

Updated RotationHandler to mimick the delay and angle allowance
that real screen rotations have.
Prevents the UI from being constantly redrawn any time the phone is
jostled at a certain angle.

Change-Id: Ifbe41349aa8ddc6b1919c31e6a613eee60fc8cac
Reapply 4ead558c Improve ICE server parsing

It got lost in the background service branch merge. Reapplying.

Altered the ICE server JSON parsing to support all the likely known
forms and combinations of username, password, credential, and url.

Change-Id: Ie0da9761b5bcab02744d84551ad12bea724d5f89