Added abstract class to twig extensions

To avoid duplication of initRuntime