Faster _CustomWriteUInt for 64 bit

Maybe it's just my i3 laptop, but the 64 bit unsigned operations are
much slower than the signed ones
Faster _CustomWriteULong method

Tried to make it work well under both 32 and 64 bit