surfaceflinger: Apply bugfixes to the correct hwc code paths

Patches to deal with corner-case layer states were mistakenly merged into
the pre-1.0-hwc code paths. Move them to their intended locations

thanks ricardo for the correction

Change-Id: I64ca0fa2ef975c3a9e8f09dc15d3ce49b92d86b7