nine/resource: fix/sanitize user data handling
nine/shader: BYTE == UBYTE
nine/shader: add sanity checks to ctor/dtors