[autotex] Reduce state file size

It's not required to indent the JSON file because it shouldn't be
processed by humans.
[autotex] Smarter wait logic
[autotex] Use msgpack instead of JSON for state files

This reduces the size of a state file by about 30%.
[autotex] Handle checksum as bytes instead of string