[qcms] Make half float code self-contained: add halffloat.h