Bumped version to 0.4.0
Fork at 9100

Seems to be caused by older wallets when calculated the wrong diff.
Ensure InitPIDstate() calcs correct diff

It seems the issue at 0.3.9 was that InitPIDstate() could have used
wrong average values when wallets initialized at different block
heights. But, I couldn't duplicate it.