Added peek, peekchar to IOBuffer (partially addresses #2638)

These mimic `peek` and `peekchar` for `IOStream`s.  

Note that neither is exported currently, and I didn't change that because of questions about generalizing the interface (see #2638).