Rigorous implementation of RFC4122 (v1 and v4) UUIDs