GlobalAction dialog ref not set to null

When a GlobalAction dialog is dismissed when screen goes into
sleep the reference mDialog is not set to null. Next time the
long presses power button and brings up the GlobalAction dialog
the old reference still exist and we try to dismiss the dialog
again even if it does not exist.

The dialog reference in this case holds on to the dialog object
using more memory than neccesary, and in rare cases we might get
a crash when the dialog object is dissmissed the second time.

Change-Id: I44ef1c385d90777e8f6dd9fe111eb3d9b0d3cf3f
Add argument to binder call to check key types

Before there was only one key type supported, so we didn't need to query
a key type. Now there is DSA, EC, and RSA, so there needs to be another
argument.

(cherry picked from commit b91773bce1126d28a93f73fbef18f3a79245f24e)

Bug: 10600582
Change-Id: I5d2be3c514ff7404a90df76dc263484c5f226e6f