Use last finished payday for calculations on stats.html

Fixes #914.