Fix hashrate bug and add stats by algorithm to index and stats pages

Also added the javascript to update the stats on the index page.