Fix bug #12469 - add more conversion methods to XmlAtomicValue.

Since XmlAtomicValue is pretty much hidden in the implementation, there is
almost no way to verify how it should work. So the changes are all based on
assumption. Yet I added a test based on bug #12469.

There is still problem on processing *invalid* inputs. They have to be
rejected, but they pass.