PIE: Disable orientation sensor when we don't need it

Orientation sensor always enabled causing some device keep awake and
battery drain. This commit fix this issue.

  * Disable/Enable orientation listener when screen turn off/on if PIE
is enabled.
  * If PIE is disabled, recycle it.

Change-Id: I6bda168b3fd62d9f7047ffc3a3c6bfd08e655543
[TEMP] PIE: fix a freezing bug

How to reproduce:
- Enable PIE;
- Toggle between on/of;
- Without close expanded status bar click any tile that use one of this methods -> private void startSettingsActivity(String action) or private void startSettingsActivity(Intent intent);
- System will freez for some seconds and soft reboot;

Solution:
- When deteced PIE mode enabled use a runnable with a less time possible to give time to system colapse panels and perform needed actions

Change-Id: Idc5f112873aa7a31993e7a3c82a1760bb45f8b9b
PIE: Unlock screen on triggering recents

* Bring up unlock panel. Clear all is still hidden when lockscreen is showing.
  Thanks to community for pointing this out.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Show IME back button in Pie.

Updated Pie to show the alternate back button when an IME is present like the stock navigation bar does.

Change-Id: I97b385904c183a42c6d76a9f238c4b9624668576
Picture: http://i.imgur.com/T0n9bVc.png

EDIT: Fixed whitespace and tabbing
Revert "[TEMP] PIE: fix a freezing bug"

This reverts commit 004b6dc18a6399cb592859188502ed6f0d265f19.
PIE: Use case upgrade and bugfixes:

1.Play with navigation bar height instead of view state. Just set navbar height to 0, even because
  swipe gesture is disabled aswell so it will never be called. This way we handle just one var
  that is height. PhoneWindowManager will take care to calculate decors since it uses height (width
  in landscape) as a param in the calculation.
2.Remove dependency from last systemui flags. Right now before this patch, pie showed no matter if you
  were in forced or native immersive mode. That made us bring a couple of hacks to keep this marriage,
  but there is no need in the end cause PIE is an alternative way you have to enable. That means apps will (should)
  use their own immersive mode at first unless you have already PIE mode on. Not all apps hide navigation bar,
  that means they can not cover the entire screen height (portrait). That's why there is forced mode, to supply this
  cause force the app to go immersive. Last but more important, immersive API works again now :)
3.Cleanup some vars not used anymore, just need observing main immersive mode now.

Change-Id: Ia17bb7ede36d5a14c8508841e32910e6e9595310
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>