Quantum anomalous Hall effect in doped ternary chalcogenide topological insulators TlBiTe2 and TlBiSe2