Analysing direct effects in randomized trials with secondary interventions: an application to human immunodeficiency virus prevention trials