Simplify namespace handling

-- Omit unnecessary namespace changes in fragment generation
-- Consolidate namespace handling into one place
-- Correct assertion messages in some SVG-related tests
Merge pull request #231 from oneeman/simplify-namespace-check

Simplify namespace handling