Dark matter and halo bispectrum in redshift space: theory and applications