TST: add unit test for stats.kstat, was not yet covered.

`kstat` still needs full review, see Statistics Review issue gh-675.
MAINT: add .idea/* (PyCharm config files) to .gitignore
MAINT: style cleanups in stats/stats.py and stats/morestats.py
TST: fix last signification digit in expected results for stat.kstat test.

Addresses review comment from Warren on PR 3680.

[ci skip]
Merge pull request #3680 from rgommers/stats-cleanup

Some cleanups in stats