Cache fingerprint->metric lookups and drop empty series from memory on flush

This is getting a bit more convoluted that I'd like, but without a major refactoring I don't see a way to do it much cleaner at the moment.