Various improvements and refactoring

This is my current development branch of this plugin's fork. It contains the changes of #13 and #14 as well as various other changes described in the commit messages.

Main focus is on making the plugin flexible enough to be used in the currently developed @cosmocode/dokuwiki-plugin-beamer plugin, while at it I tried to tackle a few of the issues I opened in your tracker.

Because many of the different features depend on each other maintaining different feature branches became hard to mange, thus this combined feature request.

I'd be happy to work with you on this plugin. Even if you don't have any time right now, a short feedback with your thoughts on this would be much appreciated.