Frameworks: Port Expanded Desktop Mode (1/2)

Credits to CM and SlimRoms

Patch set1: Clean up
Patch set2: Match with 4.3
Patch set3: Applied 0cf2c36df6 and c1c749015d
Patch set4: Rebased

Change-Id: If5e7de26afdd64b97402570fca2032df28063328