[easy] split error transformations out of typecheck_contents
[easy] split error transformations out of typecheck_contents

Summary:
`typecheck_contents` and `type_contents` are almost identical, except for how they handle parse errors (which is what I'm working on), and that `typecheck_contents` also deals with type errors.

to make them more parallel, I split the type error stuff into a helper function, `errors_of_context`.

Reviewed By: dsainati1

Differential Revision: D19950460

fbshipit-source-id: afbb37ad54d29d52529f9fa564489421d1aec5f3

mroch/flow,facebook/flow,facebook/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow,facebook/flow,facebook/flow