Add comments to ast, ast_map, ty, and pat_util
auto merge of #10600 : ktt3ja/rust/add-doc, r=huonw

I received a lot of helpful explanations when I was going through rustc's middle-end code. I document some of them here.