Only increase the counter when we do take a wakelock

We keep track on how many wakelocks we have taken. We always
just take one real wakelock but increase / decrease the
counter every time we try to acquire / release a wakelock.
The counter is always increased even if the power manager is
not ready, leading to an incorrect counter that could cause a
crash when we try to release it.
Make sure we only increase the counter when a wakelock, real
or counted, is taken.

Change-Id: Iad940e052694932f1dad8a1a71fa63601d289d6a
Do partial reads in MemoryLeakTrackUtil

Do partial read in MemoryLeakTrackUtil dumpMemoryAddresses
to avoid using more memory than what is allocated.

Change-Id: I94feb4e00647407f938571167b981c7371f39e3d
Merge "Do partial reads in MemoryLeakTrackUtil"
Merge "Only increase the counter when we do take a wakelock"
frameworks/av: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH

LOCAL_MODULE_PATH doesn't work for multiarch builds, replace it
with LOCAL_MODULE_RELATIVE_PATH.

Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
Merge "frameworks/av: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
Merge branch 'master' of https://android.googlesource.com/platform/frameworks/av into HEAD