hal: add custom platform abstraction

Change-Id: I7ce4a1b05e8957b43581242ec7e6f21f0ad900aa
Merge branch 'CyanogenMod/cm-11.0'