Stripe order of holes and spins in oxygen-doped nickelates