Prophages encode phage-defense systems with cognate self-immunity