Fixed some casting issues
[anticache] fixed some valgrind memory leaks
[anticache] added migrateBlock() function to manager
[tests] added tests for migrateBlock()