[media]: refactoring AudioSystem.cpp to C++ style

* goto operator is removed. In C++ there is no need
for goto usage, RAII idiom is the replacement for goto.

* C++ has smart pointers for automatic memory management.
There is no need for using calloc(), realloc().

Test: Every API was called from priv-app and
success operation result was returned

Merged-In: I6e61ba1cd8ce279a69389e7cc66f7961d92f8c35
Change-Id: I6e61ba1cd8ce279a69389e7cc66f7961d92f8c35
1 file changed