Restrict inlining of local fun references

Local fun references look like plain old variables in the Core Erlang
AST but should not be treated as such. Inlining of such expressions is
now restricted to application contexts as a local fun reference should
never occur in a guard.

This is not perfect as it forbids inlining in some safe situations, but
that is still better than a compiler crash.