huge refactor on Type, and remove Type.GLxxx methods, use Type.buffer_in or Type.buffer_out instead