The ionization structure of the Orion nebula: Infrared line observations and models