misc: pmem_wrapper: Check for errors properly.

Both ion client & ion handle may be pointer errors. Comparing to 0 always
returns false, leading to invalid memory access.

Also add error checks when importing ion buffers from ION driver.

Change-Id: I1949e926a3f44c67b46b458c48680ca3614d51f2
misc: pmem_wrapper: Add support for flush_pmem_file/fd.

Change-Id: Ic6dda226e7e2f876ad000f30a9449208f2286a38