Revert "Revert "Allow applications to override power key""

This reverts commit 8202cf7876129ec3ef04925d69e5a8cf22398fb9.
Revert "Revert "fb: fix possible NPE on power key handling""

This reverts commit 6c1c1681549e287a0af0aededcab6236d3872695.