Electronic structure and atomistic simulations of the ideal and defective surfaces of rutile