Bug 20844: Fixes problem sending file > 4G on 32 bit systems

Before we were using a size_t for payload size, which worked fine on 64
bit systems, but not on 32 bit systems. So now we are using uint64_t
instead.