Impact of cavitation and inflow perturbation on the performance of a horizontal-axis tidal turbine