Influence of the nuclear symmetry energy on the collective flows of charged pions