Adds the max_metadata_age_days parameter to the metadb configuration, and runs a periodic thread to expire the old metadata.