Use Traceable for primitive types, DOMString, and NodeFlags

#2662