∗-cohomology, third type Chern character and anomalies in general translation-invariant noncommutative Yang-Mills