Quantum trimer models and topological SU(3) spin liquids on the kagome lattice