Interactions of tidal and precessional flows with convection: applications to tidal dissipation in giant planets and stars