Correctly support the cache File::m_buffer in UserFile::getc() and UserFile::seek()

This fixes `getimagesize()` when applied to user streams.