[Jenkins-8063] fix NPE on e.hasStopPermission
Update to latest LTS.

This includes refactoring some classes to match the upgraded dependencies.