*: use TeeReader to reduce I/O in CAS

nack, we pass it into DetectFileType as a Reader. I The struct should be called LimitedReadWriter, will fix