libhardware: Add allocSize hook function.

Add allocSize hook function to support the custom buffer sizes

Change-Id: I0d55195cbc02af1001d6164ce8fd55380750c029
(cherry picked from commit df05397a51e2d52d45f74932212d6ccf53b044bd)
(cherry picked from commit 29abae57e4295d82297bdad6621d6795679672f3)
(cherry picked from commit b33f1d1897017a50c6fa7b6c1275449196f45e63)
libhardware: Add ifdef around allocSize

 * Non-QC devices with prebuilt grallocs hate this.

Change-Id: I57ce7547e99ec0cf40c4f05f3742348dec4e2d9d