Replace loc.h with a new header prim.h that includes tree_t and type_t
Move some definitions from type.h to object.h
Move several shared structure definitions in object.h