Primal: A Unified Deterministic Framework for Quasi-Orthogonal Hashing and Manifold Learning