tools: use '/usr/bin/env python' instead of '/usr/bin/python'

* This is how it is done in other scripts in the AOSP tree, as
  '/usr/bin/python' may be python3 on some distros, which isn't
  supported yet.

Change-Id: I0d9857fc6a122f505953fddcd6244dad75b1838a
Remove old fork-and-specialize API

As promised, this is the cleanup patch-set which removes the
old native "fork and specialize" API, which has been replaced
by a slightly-enhanced one which can close the Zygote socket
descriptors in the Zygote child.

Change-Id: I096f058e851aa079e342ecc718ff5757db68c8cd
Fix ART build with host gcc >=4.7

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Use HOST_CC for host

Signed-off-by: Paul Beeler <sparksco@gmail.com>
New header fix for gcc 4.7 build.

Change-Id: I09b49368c19d3bfb3a81d8e23b0dacf596d3bda7
Include <sys/resource.h> for rlimit.

Change-Id: I0e487f8191e284052d8b82eb942d723147d780a1

Conflicts:
	runtime/native/dalvik_system_ZygoteHooks.cc
Fix linker error with SaberMod-4.8.3 host

Main funtion "Thread* Current()" and sub-funtions static

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix NewLocalRef, NewGlobalRef to handle cleared weak globals.

We were not checking for null after decoding the reference, this
meant that we incorrectly created null weak global references instead
of returning null.

Issue: 63929
Change-Id: I9159682e6edad8f415ef8144fc13b9aedd2cceb4
Merge remote-tracking branch 'art/kitkat' into kitkat-legacy