test-utils: better constructor/valueOf handling EnumTestSupport

Signed-off-by: Ketoth Xupack <ketoth.xupack@gmail.com>
typetools: tests, serialization improvements

Signed-off-by: Ketoth Xupack <ketoth.xupack@gmail.com>