Finally implement beforeController

Added beforeController settings loader and twig appParams service loader
so we can use appParams everywhere in the application.