msm: kgsl: Detect and avoid malformed ioctl codes

Because we were using _IO_NR, one could construct a malformed ioctl
code that would avoid allocating memory yet go to a function that
expected that memory. Still use _IO_NR to index the array of ioctls,
but check that the full values match before jumping to the helper
function.
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=commit;h=1e76f61bb001b93795a227f8f808104b6c10b048
diag: Improve handling of IOCTLs

DIAG kernel driver interacts with user space processes using
IOCTLS. This change adds conditions to avoid potential integer
over/underflow, incorrect buffer copy.

CVE-2012-4220
CVE-2012-4221
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=commit;h=77ad483f7b82d944aae5b944cd28e923a5293668
update build script
change battery binary path and debug log
Backported power driver from CAF's ics_chocolate.

probably fixed issue #19