Electronic properties and Schottky barriers at ZnO–metal interfaces from first principles