Simplify the interface to check_fn by pulling some of the madness out to its callers
auto merge of #5309 : nikomatsakis/rust/simplify_check_fn, r=nikomatsakis

Simplify the interface to check_fn by pulling some of the madness out to its callers.

rs=refactor