Gender, relationship length and the risk of heterosexual HIV transmission