Ionization structure and composition of the planetary nebula NGC 7027