cksum: NetBSD-adapted cksum()
[Looks like the original cksum() code was derived from a BSD implementation, looking at the copyright and version.]
Update cksum() to use more recent NetBSD-based checksum implementation. The updated implementation includes both a 64-bit and 32-bit (the default) implementations. The 64-bit implementation has a longer stride length, which may be beneficial to overall performance.
Update the return types for cksum() and ip6_cksum() to uint16_t, which is what the checksum algorithm computes.