Drivers pass closer when overtaking cyclists wearing helmets than when overtaking bare-headed cyclists, increasing the risk of a collision, the research has found.