(PUP-1044) Make FileBucket::File use a file when possible

This replaces the usage of binread of the entire file contents whenever possible (for computation of checksums, or for returning the size of the data).
@hlindberg this will likely fail on windows, because it is opening the file in text mode and will automatically translate \r\n to \n, thereby corrupting any checksum computation.