convert CBufferedFile into a RAII wrapper

- it takes over the passed file descriptor and calls fclose() in the
  destructor
- this fixes a leak in LoadExternalBlockFile(), where an exception could
  cause the file to not getting closed
@sipa I took that from ``CAutoFile`` and can't interpret your comment. Should I just directly do this in the destructor?

<pre>
if (src)
    fclose(src);
</pre>