Move truncate() wrapper to futil.h

- Isolate platform-dependent file handling code better, removing
  some platform-dependent #ifdefs and #includes from higher-level files.
- Make 'gmx trjconv -trunc' independent of the platform (should now also
  work on Windows).
- Don't leak file handles when truncating on Windows.

Change-Id: I66162978c7b29499c8fc796d15b5f2649abf59dd