bluetooth: Fix power-state tracking

If bt was turned off when already off, it'd instantly crash the
device. This wouldn't happen under normal circumstances, but I triggered
it frequently while getting the function to work, and it's a simple
fix
bcmdhd: Do not deref null ptr in p2p code.
Fix crash when bluetooth is turned off while connecting.

When msm_gpiomux_get() fails, do not attempt to msm_gpiomux_put() on the
failing index.

Change-Id: I1541246dfb16222a9f22ea6ce87b17c7f817d424
Do not allow multiple gpio refs in configure_*_gpios().

bluetooth_platform_data.bluetooth_power() is called for every write to the
bluetooth rfkill sys file, which in turn results in an arbitrary number of
calls to configure_*_gpios().  The gpiomux objects are reference counted,
so we cannot allow arbitrary gets and puts.

Fix this by only allowing one gpiomux reference in configure_*_gpios().

Change-Id: I0184821e3c5c907f1bcb246cd7766e52ebefdacf
Merge branch 'android-msm-3.0-jb' of https://github.com/CyanogenMod/lge-kernel-iproj into HEAD
Attempt at fixing battery drain by adjusting sleep and idle values