Mir hits hat-trick to send Spain into Olympic football semifinal with Japan