Implement box checksumming

This fixes issue #1124.

@phinze and @fgrehm: Looking for any obvious mistakes or issues with this pull request. Barring any issues I'll merge tomorrow. Thanks!