A nucleus-like compartment shields bacteriophage DNA from CRISPR-Cas and restriction nucleases