MAIT cell plasticity enables functional adaptation that drives antibacterial immune protection