Nuclear and nucleoid localization are independently conserved functions in bacteriophage terminal proteins