allow using TEfficiency with book()/hist() mechanism
While it was seemingly supported so far, it didn't actually work. This should now be fixed, and a test for it added.
I also went ahead and made the basic function a template, so that users can use it with any histogram-like class deriving from TObject. Though that part will only work in AnalysisBase, as I only modified the AnalysisBase part.