libhardware: Add allocSize hook function.

Add allocSize hook function to support the custom buffer sizes

Change-Id: I0d55195cbc02af1001d6164ce8fd55380750c029