Allow storage of name-based UUIDs

The variant check also could never fail, making the entire
uuid_validity_check function obsolete.
Cache the input value when it is useful

This should be less expensive than unparsing the value later, due to
String's copy-on-write.