Molecular basis of antibiotic self-resistance in a bee larvae pathogen