Move extensions code

$twig is not available, and $app['twig'] is not yet bound, so moved
them.
Merge shared variables

For Twig::render, give them access to __env (for composers etc.) and app
+ errors variable. Fixes #112
Make chainloader shared

So loaders can be more easily added.
Also used bindIf with $shared=true on the twig itself, which does the
same but more clean. Fixes #123