Fix double-delete in PhotonIdUtils to remove segfault, then assorted cleanup