A young woman who falsely told police she had been threatened at gunpoint by her ex-boyfriend has been jailed for perverting the course of justice.