Update typedef.py

added _Reg, 
added TypeDefError, RegisterError exception classes
TypeDefSet is now instance of _Reg
Fixes