BUG-7833: Fix identityref codecs
Introduce QNameCodecUtil to help JSON and XML codecs correctly implement
their identityref codecs. As it turns out, both only need to provide
proper mapping functions without having to deal with multiple codec
hierarchies.
The patch is also more strict about parsing the string, as it rejects
malformed identityrefs, i.e. those which contain invalid characters.
This fixes BUG-7833, which is triggered by invalid PUT, where we parse
an empty string as a null identityref.
Change-Id: I1f3086a0f9e930f7782dff8d6c39329d4b28ed14
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>