Speed up WriteInt64.

This was derived from https://github.com/scorpiona/bsdiff.net/commit/92c197e8052d381703b7f688d42d33565ee291c3 and the ensuing discussion.
Fixed db/eb being allocated with an extra byte

(cherry picked from commit 1c2cbc11c0b9329749c97b0482e0b1a29bf7fb4e)
https://github.com/scorpiona/bsdiff.net/commit/1c2cbc11c0b9329749c97b0482e0b1a29bf7fb4e