effects: define `Core.Compiler.infer_effects`
This new reflection utility is similar to `Core.Compiler.return_type` but
for the effect analysis. It comes with its own tfunc and similar compiler
optimizations so that we can fold inferred effects at compiler time when
possible (albeit it is as unreliable as `Core.Compiler.return_type`).