Statistical mechanics of (2 + 1)-dimensional black holes