split off the hash functions from the dicts/lambda's. too much duplicated code
```
try:
    import hashlib
    md5_func=hashlib.md5
    sha1_func=hashlib.sha1
except ImportError:
    import md5, sha
    md5_func=md5.md5
    sha1_func=sha.sha
CHECKSUM_FUNCTIONS['md5'] = lambda p: calc_block_checksum(p, md5_func())
CHECKSUM_FUNCTIONS['sha1'] = lambda p: calc_block_checksum(p, sha1_func())
```