The impact of HIV epidemic phases on the effectiveness of core group interventions: insights from mathematical models