Fix bugs with designate generation and refactor

Fix standalone designate generation.  Improve code structure slightly and refactor tests to use XmlTester.  Make the tests check the complete xpath.

Signed-off-by David Jencks <david_jencks@yahoo.com>
Merge pull request #677 from djencks/456-meta-anno-2

Fix bugs with designate generation and refactor