Fixed bloated loan stats displayed on home page.

The loan stats were being counted from the infobase logs, which
sometimes have multiple entries for the same loan. Fixed it by taking
loan stats from stats table in the database.