A mobile restriction–modification system provides phage defence and resolves an epigenetic conflict with an antagonistic endonuclease