Initialize potentially uninitialized variable

(cherry-pick of c71aad6f1c999c0f4126bce89bd1d9a276e745dc.)

Change-Id: If915c9cfce0a40c5ad82e7378ae56738e9f2a6e9
Memory leak in IInputMethodSessionWrapper executeMessage

In some cases the executeMessage is called with
mInputMethodSession == null. For the messages

DO_UPDATE_SELECTION, DO_APP_PRIVATE_COMMAND

memory is leaked. This commit recycles the args freeing
the allocated memory.
handle negative temperature

When the battery temperature drops to below zero, BatteryLevelInit()
fails to show negative temperature. Because the type is unsigned
and the size of bit field is 10 bits.
So to handle negative temperature, change the type of battery temperature
from "char" to "short". And extend the size of temperature bit field
from 10 to 11 bits, which first bit is used for the sign bit.

Before:
31             24                    14                 0
+---------------+---------------------+-----------------+
| Battery Level | Battery temperature | Battery Voltage |
+---------------+---------------------+-----------------+

After:
31           25                      14                 0
+-------------+-----------------------+-----------------+
|Battery Level|  Battery temperature  | Battery Voltage |
+-------------+-----------------------+-----------------+

Bits 31..25: battery level percentage (7 bits unsigned)
Bits 24..14: battery temperature (11 bits signed)
    First bit is used for the sign and others for the temperature
Bits 13..0: battery voltage in 0.001 volt units (14 bits unsigned)

Becuase of changing the format, let the BatteryStatsImpl.VERSION field
increment.

Bug: 8009514
Change-Id: Iaa12f4d3f14e6cf4d73bc1a23d81c60f9677a499
Fix a variety of small publicly-reported bugs.

Possible NULL dereference in cmds/bootanimation/BootAnimation.cpp.
https://code.google.com/p/android/issues/detail?id=61556

Missing fclose in core/jni/android_os_Debug.cpp.
https://code.google.com/p/android/issues/detail?id=61546

Bad loop guards in core/jni/android_util_Process.cpp.
https://code.google.com/p/android/issues/detail?id=61557

Assignment to wrong variable in libs/androidfw/AssetManager.cpp.
https://code.google.com/p/android/issues/detail?id=61560

Missing delete[]s in libs/androidfw/ObbFile.cpp.
https://code.google.com/p/android/issues/detail?id=61549

Leaks on error in tools/aapt/Images.cpp.
https://code.google.com/p/android/issues/detail?id=61552

Two missing fclose calls in tools/aapt/Resource.cpp.
https://code.google.com/p/android/issues/detail?id=61553

Missing fclose in tools/aidl/aidl.cpp.
https://code.google.com/p/android/issues/detail?id=61554

Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a