halapi: common: Add hal_common_(get|put)_backend() function to handle backend data
Following step is for getting the backend data which contains the
function pointers for each HAL module.
1. get library name of HAL backend
2. dlopen with library name
3. get symbol name of HAL backend
4. dlsym with symbol name
5. Get the backend data via backend->init()
In order to reduce the duplicate code on each HAL API packages,
add hal_common_get_backend() helper function which contains
the above steps to get the backend data.
And add hal_common_put_backend() helper function to free
the hal_backend instance and dlclose the shared library.
Change-Id: Ic603d3e4f0ba1ff2aed9699b1eaf925cbd97c60c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>