ActivityManagerService: Penalise large apps going to background

Large applications (PSS more than a given threshold) when closed are
penalised with higher ADJ. Now, they will be more prone to be killed by
lowmemorykiller during memory pressure levels. This ensures better app
concurrency and improved subsequent latencies as it leaves some more room
for other smaller bg apps to be alive

Change-Id: I448fa12f55370949b22075595cd75b9c29e5d4b5
ActivityManagerService: Fix heavy games kill during incoming call

Force heavy apps penalisation only to large "cached" apps. Donot
include "previous" app in this category. This ensures large apps
are not killed during special incoming alerts like incall, sms.

Change-Id: I51b4a238415efad63ef36f7e0cd056823a72a47d
Prevent killing of process during service bringup

ActivityManagerService sometimes kills the process whose service
is being brought up during bindService.
This happens when the process starts hitting some Pss threashold.
Specifically this is causing InCallUI process to be killed during
bind request from Phone app.

CRs-Fixed: 681329

Change-Id: Id548a22d7e7ce3aa0b0511763078f813fafd6e16
base: Change mobile provision checking to 3 times' HTTP connection

For mobile provisioning checking, somehow server is unreachable.
There is more than 10 TCP packets sending out without any TCP ACK
in 1 minutes. It will trigger data stall detection and finally
will cause radio reset happened after several iterations.

This fix will change mobile provisioning checking to only use HTTP
connection for at most 3 times. It will be finished in shorter time
and less than 10 TCP SYNC packets are sent. Hence even server is
unreachable, it will not trigger data stall detection.

CRs-Fixed: 715233
Change-Id: I01a76214b801415969436fee33fdb2c40dcf5793
Remove unnecessary explicit GC in ZygoteInit.

Removes > 1s of GC time and hundreds of GC during device boot.

Zygote size before: 8388608
Zygote size after: 8388608

No increase in zygote space size due to zygote compaction.

Bug: 16398684

Change-Id: I3c6f5a0b26a207ab39bb0a952400d7488e42f00c
Signed-off-by: anerikg <anerikgames@gmail.com>

Conflicts:
	core/java/com/android/internal/os/ZygoteInit.java