As, when loading a glossary, we always have a glossary, even if empty, moved the
Glossary loading from a static constructor to a normal constructor, and put some
code in an init() function.
Moved some methods from inline to the cpp, just to have more controls.
Improved the algorithm for the replacing:
[img]foo.png[/img] => <img src="/path/foo.png"/>