make FileStat hashable, and Paths serializable

This PR makes `std::io::FileStat` hashable, and `Path` serializable as a byte array.