Molecular mechanisms of CRISPR-mediated microbial immunity