Html export extensions

I implemented some additional commands for exporting formatted source code.
Did some slight refactoring along the way.
Please see the individual commit messages.

If there should be flaws be patient with me, it's my first serious pull request :-)

I think I have everything quite cleaned up,
but didn't manage to run update-pot (so that's to be done still).

I will add two feature requests on the issue tracker, but I'm heading towards implementing them myself (with maybe some assistance).

Am I right that there isn't any documentation on this kind of functionality in the user's guide?
(I looked for it to add documentation for the new functions, but didn't find anything. If you tell me where and how to add it I'll do).

Hope you find the stuff useful