A former Leicestershire Police officer has been jailed for six months for misconduct in public office after having a sexual relationship with a woman he met while leading an investigation.