audio: fix for unhandled NULL pointer in HAL

- Check if handle is NULL before calling pcm_close
- Check if usecase is NULL before string comparison
  operations
- Disable unnecessary debug logs in HAL

Change-Id: I569cbf510c820e1a155abf3efb4bbb525e68aafb

Conflicts:
	legacy/alsa_sound/AudioSessionOut.cpp
alsa_sound: Fix for unhandled NULL pointer

-Passing NULL pointer to pcm_read()/pcm_write()/
 pcm_prepare() would crash, since it doesnt perform
 a NULL check before using the pointer, resulting
 in random crash
-Fix is to check whether handle is NULL or not.

Change-Id: I7061d40bddcaaae2145f5fc0a0229abeebead878
CRs-fixed: 549257
alsa_sound: Fix a memory leak

A pointer variable was not being freed up which is
causing memory leak.
This change is to fix the same.

Change-Id: I12728a4a75fb303d34d10657fe9cbc1b55c1687e
CRs-Fixed: 523572
  alsa_sound: Fix for voice volume restore after reboot

  - Maximum volume is heard for call after reboot even if it
    was set to minimum during the last call before reboot.

  - During call after reboot, mLastvoiceVolume is getting
    updated improperly and hence proper volume is not
    being applied.

  - Fix is to cache the voice Volume properly.

  CRs-Fixed: 517731

Change-Id: Ia9512afaab94407f04011541db1b49b41cd5707a