Study of the development of relativistic plasma bunches in a long mirror trap by optical and X-ray imaging and numerical simulations