Refactor utility functions * Make clear separation between buffer allocation model API headers. * Make clear device API in a header potentially support different HAL drivers. * Remove extern declaration and use proper declarations in the header file. Change-Id: I49ef2f3547dc39e19c3da6b8783a16e6dcffb704