Task: Fixes precision mismatch when appending to an XTC file with 9 atoms or less (openmm/openmm#4794)

org: openmm
repo: openmm
pr_number: 4794
issue_title: Fixes precision mismatch when appending to an XTC file with 9 atoms or less
issue_body: Should fix #4793.  Note that this issue in the reading code is triggered by attempting to append to an XTC because the XTC writer reads before appending to check that the number of atoms is consistent.
resolved_issues: number: 4793
title: "xtc_read(): precision mismatch" when creating a new reporter appending to an existing file
body: Hi,

I encountered an error of which I could find no information anywhere else. When running the following code with some dummy systems with the same atoms, I get an error as soon as I end up on the last step. I am running a Free Energy Perturbation, using a range of different systems forming one trajectory. This error seems to be caused by using a new xtc reporter on the same file. If I use the same xtc reporter, I get the correct results.

```
with open('system1.xml') as f:
    str = f.read()
system1 = mm.XmlSerializer.deserialize(str)
with open('system2.xml') as f:
    str = f.read()
system2 = mm.XmlSerializer.deserialize(str)
pdb = mmapp.PDBFile('topology.pdb')
topology = pdb.topology
positions = pdb.positions

integrator1 = mm.VerletIntegrator(1.0*mmunit.femtoseconds)
simulation1 = mmapp.Simulation(topology, system1, integrator1)
simulation1.context.setPositions(positions)
xtcrep1 = mmapp.XTCReporter('traj.xtc',1)
simulation1.reporters.append(xtcrep1)
simulation1.step(10)
positions1 = simulation1.context.getState(getPositions=True).getPositions()

integrator2 = mm.VerletIntegrator(1.0*mmunit.femtoseconds)
simulation2 = mmapp.Simulation(topology, system2, integrator2)
simulation2.context.setPositions(positions1)
xtcrep2 = mmapp.XTCReporter('traj.xtc',1,append=True)
simulation2.reporters.append(xtcrep2)
simulation2.step(10)
```

## IMPORTANT INSTRUCTIONS

1. If you edit a python file, you MUST run 'make PythonInstall' inside the build directory
2. If you edit a c++ file, you MUST run 'make -j4 && make install" inside the build directory

Reference solution:
fix_patch: diff --git a/wrappers/python/openmm/app/internal/xtc_utils/src/xtc.cpp b/wrappers/python/openmm/app/internal/xtc_utils/src/xtc.cpp
index 838e3709df..de65c83fef 100644
--- a/wrappers/python/openmm/app/internal/xtc_utils/src/xtc.cpp
+++ b/wrappers/python/openmm/app/internal/xtc_utils/src/xtc.cpp
@@ -81,7 +81,9 @@ struct XTCFrame {
 
     // Read the next frame from the XTC file and store it in this object
     int readNextFrame(XDRFILE* xd) {
-        float in_prec;
+        // Preinitialize in_prec for the precision check below since it may not
+        // be modified by read_xtc if the coordinates to read are not compressed
+        float in_prec = prec;
         auto* p_ptr = reinterpret_cast<rvec*>(positions.data());
         int status = read_xtc(xd, natoms, &step, &time, box, p_ptr, &in_prec);
         if (status == exdrOK && prec != in_prec) {