Mitigate performance TypedXml regression.

When an attribute value is missing, we can immediately return the
default value instead of paying the cost of throwing an exception.

To bring this benefit to both human-readable and binary XML, this
is implemented by adding a new getAttributeIndex() lookup method
which is then used by default methods.

readExtraAttributes() also appears to be parsing a string list as
a boolean value (which seems very broken), so we add hand-rolled
parsing logic to avoid paying the cost of an exception.  Someone
should follow up in the future to investigate if there's an actual
bug here.

Bug: 174544002
Test: manual
Change-Id: Id313d18000e345ca1acd3c66d2c0c0fc44769b71
4 files changed