WIP: Improve unit test coverage and docs in `modeling` for the 0.3 release

@nden @embray I have started working again on modeling unit test coverage, docs and cleanup ... hopefully this can be merged next week before the 0.3 release. I'm just making this PR now so that I have a place to ask questions for things I don't understand.

It's kind of hard to resist making little changes like fixing typos or docstring formatting, so I expect there will be conflicts with #1086 and #1596 that touch a lot of lines, so if you can merge those soon into master that would be great.