refactor signing; remove dependency on ruby-libxml

also still working on remaining memory leaks. it seems we should be able
to call LibXML->xmlFree, but these functions always cause a segfault.
Best guess currently is that they are not binding properly at the FFI
layer. Futher investigation to follow.