udf: Improve input validation.
The existing code frequently assigns unsigned 64-bit values to variables
that are signed and / or shorter without checking for overflow. Try to
deal with these cases.
While here, fix two structs that used single-element arrays in place of
flexible array members.
PR: 287896
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51339