#5369: Improve file allocation error checking (initial patch by g.proskurin)

Additionally,
* always close file descriptor on error in cached_file_open (FD leak),
* only store file descriptor to tr_cached_file on success,
* call ftruncate after xfsctl-based preallocation so that correct size
  is reported by the system.


git-svn-id: svn://svn.transmissionbt.com/Transmission/trunk@14367 f4695dd4-2c0a-0410-b89c-da849a56a58e
Fix tr_moveFile error reporting

Remove unused `renamed` argument.
Use tr_error instead of errno to report errors to support Win32 file
wrappers which do not map Windows error codes to POSIX ones.
Return bool instead of int (0/-1).

Uncomment tr_error_prefix and tr_error_propagate_prefixed functions.


git-svn-id: svn://svn.transmissionbt.com/Transmission/trunk@14368 f4695dd4-2c0a-0410-b89c-da849a56a58e