Workaround resume/pause deadlock in Android by killing

https://github.com/libgdx/libgdx/issues/904

Repro steps:
1. Open libgdx app.
2. Open Android Recent Apps.
3. Double-tap Recent Apps with ~500ms between taps.
4. Tap Recent Apps once to bring libgdx app back -- if it comes back with no ANR, repeat steps 2-3.

As an interim bandaid we are killing the app if pause takes longer than 4 seconds (ANR is 5 seconds).

With this patch, the app closes during pause instead of ANRing.
Experimental: Attempted fix for rare ArrayIndexOutOfBoundsException

This might fix #1095 It will at least prevent crashes in those weird situations.
Merge remote-tracking branch 'origin/master' into patch-3
Switched to NUM_TOUCHES
NetJavaImpl: getResultAsString removes line breaks
- fixed getResultAsString to copy the whole http respnse into the string
- added a second button to NetAPITest to download a text file
Fixup button state in test.
Add parameter to hide the gradient editor of the gradient panel
Make background color of the particle renderer configurable
Merge pull request #1115 from veger/particleeditor-2

Make particle editor background color configurable
Small changes, mostly docs
Merge pull request #1118 from xoppa/3dapi

Small changes, mostly docs
Merge pull request #1114 from hneuer/nettext

NetJavaImpl: getResultAsString removes line breaks
Merge pull request #1018 from jrenner/headless

initial commit of new LwjglHeadlessApplication for a headless libgdx
Fixed argument check
Merge pull request #1097 from Unkn0wn0ne/patch-3

Fix for rare ArrayIndexOutOfBoundsException in AndroidMultiTouchHandler
Closes #1120
Add LwjglHeadlessTest
Merge pull request #1121 from xoppa/3dapi

Add LwjglHeadlessTest
Add LwjglHeadlessApplicationConfiguration
Add interval