refactor Remove unused imports

With the conversion with at-noder-converter, some unused require's
were added to the code (requires that do not save the required module
to a variable). They can be removed.

Note however that there are still some require's not saved into
a variable in the code which are still needed. They are mostly:

- requires of cfg beans
- requires of filters

This is because cfg beans and filters are passed to certain methods by
their string classpath, and not by object reference.

Close #1293.
fix #1319 resource provider mistakenly disposed on class unload

If a template class is associated to a template script which uses a
resource provider, the resource provider is mistakenly disposed when
unloading the template class (even if the template script is still
loaded).
This is an issue especially in some skin reloads scenarios, in which
the template script is not reloaded while the template class is reloaded,
which leads to a situation in which the reloaded template can no longer
use the resource provider which was mistakenly disposed.