Add test cases for prefix-namespace mapping

Add tests to QNameReferenceTest to ensure that our implementation
1) writes correct documents w.r.t. QNames and
   prefix-namespace-declarations
- loads and resolves valid documents with different scenarios:
 2) normal: default=target ns; prefix for imported elements
 3) inverse: default=imported namespace; prefix for local elements
 4) no ns: no default and no target namespace
- has a reasonable fallback behavior for slightly incorrect documents
  with unprefixed QNames (to be interpreted as local references):
 5) no default but target namespace
 6) no import element associated with default namespace

7) Add a test for a newly discovered bug: different namespaces with the
same last path segment are mapped to the same prefix ('urn:modelB' and
'urn:path:modelB' both have 'modelB' as default prefix).

Tests 1, 3 and 7 fail currently. This will be fixed by subsequent
commits.

Bug: 329668
Bug: 329804
7 files changed