Modelling oxide surfaces from first principles: defects, reconstructions, surface vibrations and polar surfaces