Code cribbed from Andrew Moon's Public Domain SipHash-2-4 implementation (which IMO is also cleaner). Fixes bug 17544.