audio policy: fix issues in effect parameters parsing

Fix several issues in AudioPolicyEffects.cpp
- Fix old bug in growParamSize() that should take a pointer
to the address of the parameter structure because it can
modify it by calling realloc()
- Fix warnings reported by clang static analyzer
- Add checks on memory allocations

Bug: 26938281

Change-Id: Id0bfa64371d95356d9fc308c6ea9c74e10ab1be0
2 files changed