Add some quat API, sq() macro in core/util.h