Solicitor and wannabe MP agreed to pay damages after spreading inaccurate claims about young teacher who was 'put in danger'