Bug fixes:
1) Fix memory leak when metric expires. The metadata metric is deleted
properly, but the value metric is not.
2) Memory leak because global_context is not destroyed before reloading
config.
3) Fix errornous handling of zip content.