Add method to escape xml-section

Add a method to escape the msg, stat and author section for commits in
git.
Modify the get_repo_log_as_xml to centralize the logic for git, hg, etc.