Validate mesh subset and level of detail ranges
A subset's count and offset, and those of its levels of detail, go
straight to drawIndexed() or draw(), and nothing checked them against
the buffer they index. A file could ask for four billion indices out of
a nine index buffer and the only thing between that and the driver was
the driver. Require every range to fit.
The component types get the same treatment: getSizeOfType() is
Q_UNREACHABLE outside its enumeration, so a value of zero or twelve was
undefined behaviour in a release build and a qFatal in a developer one.
Pick-to: 6.12 6.11 6.8
Change-Id: I166f2bc0c56496e29f5a9502be598dc4bcbb91e0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>