IPO & (Function) Attribute Deduction, reviews needed

In a thread last August [0] I pointed out problems with the current
attribute deduction mess. There are also other threads coming to similar
conclusions, e.g., [1]. I finally found the time to clean up my
replacement pass* and chunk it into logical pieces.

If you are interested in better IPO, attribute deduction is a crucial
first step. Without proper annotations, it is hard for passes like
argument promotion to transform the program.