Fix compilation with latest rustc master

- Freeze is gone, but that's ok because Rc doesn't use it anymore.
- Indexes must now be uint.
- Struct fields are private by default.
Clean up all the warnings

All the file I/O now uses .unwrap() to trigger task failure if the I/O
operation fails. Also use fill() instead of read() because the code
expects the entire buffer to be filled.

Mark some public fields as private if nobody outside the module is using
them, to avoid having to make their types public.
Merge pull request #6 from kballard/rustc_master_7bda3df

Fix compilation with latest rustc master