Moved updater hooks to registerHooks() method, fix enc unit tests

- moved cache updater hooks to a static method Updater::registerHooks()
- call registerHooks() from proxy encryption test to make sure that the
  cache follows file operations
- added test cleanup code for encryption tests to remove key folders

This should reduce a bit the number of cleanup warnings for the encryption test suites.

Note, I tried registering updater hooks and clearing them hooks from the other encryption tests but it seems to fail for some reason. Something to investigate another time.

Please review @schiesbn @DeepDiver1975 @karlitschek