Implement Truncate() in file-like implementations.

gkvlite's file interface recently added the Truncate() method, in
order to be able to revert gkvlite files to previous states, and so we
need to implement it here.