WIP: add support for HWC < 1.0

Cherry-picked from https://github.com/CyanogenMod/android_frameworks_native/commit/8e8f98e26a756bc3a64d2443c3ce68660f78f175
Implement missing functions introduced in HWC 1.4
sf: Fix detection of 0.3 hwcomposer

The format was different, so look at the header bits too...

Change-Id: Ibc3d4c9f6bca74d6951041f92e2ecc6189e58c41
sf: Don't do premultiplied alpha blending on the statusbar for hwc <= 0.3

Blending the translucent statusbar with the limited alpha implementation
of older HWC versions is glitch-prone, so don't do that with the compositor
at all

Change-Id: I96b49823b837a5063960d39c0937caea8bb3116a
Merge commit 'bfa217601671a6c3d3bb65346ce27f67a2c165e7' into HEAD