Support gzip and bzip2 compression for StateDataReporter (based on filename extension) and other small fixes

Repeat of closed pull request #177, but this time with the flush calls still present.

Also fixes a would-be NameError in pdbstructure.py and adds element aliases for the British spelling of sulfur and aluminum.