Stats plugin should only show active datasets

There are a number of metrics displayed that don't take into account if the dataset is private or deleted. The stats plugin code is heavily unmaintained, but it should be all right to plug the main leaks.