Color-singlet and color-octet J / ψ production in top quark rare decays