closes https://github.com/NodeBB/NodeBB/issues/2077
fixed potential NaN issue https://github.com/NodeBB/NodeBB/issues/2077
fixed resetLockout
Merge remote-tracking branch 'origin/0.5.1' into hashtalk