voxel file corruption fixes

This fixes some error cases in parsing of corrupt or dubious voxel files. I believe it also fixes most cases of the random "large voxels in space" problem that has been plaguing us for a while.

* **Overflow guards on parsing bitstream** - One problem I discovered is that the original (like Jan 2013) voxel parsing code would read from a buffer but didn't check to see if the buffer contained enough bytes to keep reading. This would cause the parsing code to run off into memory and read in garbage. After much debugging, I determined that some of these corruptions were not happening on edits or on file saving (see note below) -- but instead on reading in the files. Sometimes reading the exact same file would produce different results (depending on the state of memory we overflowed into).

* **Writing bad voxel bitstreams** - I introduced a corner case in the entities merge that would cause voxel bitstreams to be written in an erroneous manner, and sometimes spin out of control filling the disk.

Note: there may still be cases that causes us to write these corrupt files. I found one repro case that with these fixes no longer has problems. But I'm still hunting for other repro cases.
error here typo with same variable name