Better buffer clear code

Found some code to do a cleaner buffer clear from the Zaber instrument.
This way, the buffer read gets exactly the number of bytes within the
buffer. Seems to work just fine; committing.