Add checksum tests; separate checksum related code; extract utils

Following tests for checksum computations are added:
* execution time measurement for different implementations
* computation correctness.
Code for checksums is now separated and some utility functions are
also extracted. Checksum calculation speed tests are kept in a separate
module too and can be run by make speed_test.
WIP