CBufferedFile: add explicit close function

- also use identical close function for CAutoFile (avoids setting file to
  NULL under wrong conditions)
CAutoFile: make file private