Partition Functions for Quantum Gravity, Black Holes, Elliptic Genera and Lie Algebra Homologies