Add checksum tests; separate checksum related code; extract test 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 for tests
are also extracted.