Histone-mediated chromatin organization in prokaryotes and viruses