Extract Methods, Arguments, DocBlocks and Tags

With this commit we extract the method, argument and DocBlock handling
fromt he XML writer into their own class. This refactoring makes it
easier to re-use specific parts (recent bug fixes needed significant
work without these refactorings) and by adding unit tests immediately
we also increase code coverage.