Replace builder with Nokogiri

Using Nokogiri to build the xml is supposed to be more efficient in terms of less objects created for the GC to clear up. This may aid, it does not solve, the memory leak issue.