Fix XPath.XmlDocument concurrency problem
Merge pull request #209 from krwq/XmlDocFix

Fix XPath.XmlDocument concurrency problem and memory leak