Twisted Covariant Form Hierarchies: From Hidden Symmetries in M-theory to Anomalies in Heterotic Backgrounds.