Quasi-Hopf algebras and representations of octonions and other quasialgebras