Frameworks: Be sure heads up view is attached before removing it

We did not have it in our tests but some user ran into it. Thing is if the
system is disabling notifications for whatever reason and till this time the
view was never attached and the system tries to detach the view on windowmanager
we run into an illegal argument exception.

Fix it with simply checking if the view was attached before removing it.

Change-Id: I0800beed3553815cc529087052138345773b32e4
Merge remote-tracking branch 'aosp/lollipop-release' into lollipop
Frameworks: Gesture Lockscreen (1/2)

This adds the ability to us a hand drawn gesture as
a means to unlock the device.

In the case that the gesture is forgotton or not
being recognized correctly, the fallback will be the
same as when using patterns.

Androidx:
Some changes needed for 5.0

@alviteri: crDroid'fy

Conflicts:
	core/java/com/android/internal/widget/LockPatternUtils.java
Enable NSRM (network socket request manager)

NSRM is a feature to synchronize app socket requests
to reduce network signalling and there by save some power.
Wakelock Blocker [1/2]
fix reboot icon in power menu theme
enable advanced reboot as default