Fix some file-related savestate issues

Turned out not to be that hard to find.

Changes:
 * A new member was added to files, now it's part of DoState() as well.
 * The destructor for file kernel objects was closing handles, after the handles had been loaded.  Now the order is reversed.

This fixes savestates in Patchwork Heroes, and may fix #622.

-[Unknown]