Gather the methods of Resfile in a single file.

The writing methods were separated so that they could avoid be linked into the main binary, but this didn't work anyway (because of the virtual methods).
Streamline the Resfile class.

Do not keep the Res_dos object around, make some more method const, remove the unnecessary virtual keyword.