H-dibaryon and hypernucleus formation in the Ξ-12C reaction at rest