Prevent IPCThreadState::joinThreadPool from spinning on unexpected error

Adds logging to help determine what is happening to the /dev/binder
fd and dump the process state when it happens.

bug: 8912673
Change-Id: I2aa0c66fc499e91e0bf9ee4ae20404bec35adc82
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
Find non-extension GLES wrappers in eglGetProcAddress

This allows apps to find OpenGL ES 3.0 functions using
eglGetProcAddress() instead of dlopen/dlsym.

Bug: 9681677
Change-Id: I7ce6e1636bc47d6b0bf20a4e46bd67235714d129
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
fix a dead-lock in sensorservice

sensorservice would deadlock if for some reason
a sensor failed to enable.

simplifed the code a bit, and made it behave a little
closer to mr1.1 -- I couldn't convince myself that
some changes in how locks were used were correct.

Bug: 9794362
Change-Id: I6110f5dbb67e543f1c71d127de2299232badb36a
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
Merge tag 'android-4.3_r2.2' into HEAD

Android 4.3 release 2.2

Conflicts:
	opengl/libs/EGL/Loader.cpp
	services/sensorservice/SensorService.cpp

Change-Id: Ib554df63ab22b2e100ec2d3f3cc88d0c408ae4dc