A Thornhill flat that was the centre of drug use, violence and anti-social behaviour has been ordered to close