refactor stats/distributions.py

Deduplicate a bit of code in stats/distributions.py: move exact duplicates from `rv_continuous` and `rv_discrete` to `rv_generic`, fix a couple of typos.