codec2 hal: AIDL type conversion, step 3

Implement conversions for buffer types.

Reuse the function templates when applicable, and specialize for
AIDL-specific part of the code.

Bug: 251850069
Test: m && m libcodec2_aidl_client
Change-Id: I42dd434f08007b5ccbfc1e222e601043f24883f9
3 files changed