Improve the way in which XLA optimization_level is set.
This allows users to set the optimization and memory fitting level via the more intuitive `jax.EffortLevel.O1` or `"O1"` instead of needing to provide the enum value (e.g., `19`).
PiperOrigin-RevId: 953022900