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.
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: I650c28825cc1195a1b5353c9aee2ca2d9e15ec5d