photophase: restart lwp service on bad egl context

This patch contains some fixes for bad egl context detection and other NPE and lint fixes

Change-Id: I47c4348770dc72f768df4bea27c7817d1ec10c42
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>