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).