Completion improvements for higher-order-functions

This is built on top of #786, and the last code contribution from the plane :)

Better job at inserting completions for higher-order methods

This little changes makes life easier when completing methods that take lambdas.

* use braces instead of parens
* insert a dummy lambda `x => ???` instead of `f`, or whatever the parameter name is

Fixed #1002250.
I don't understand why `A` is not allowed to be a function (for `B` it shouldn't matter). It means that this feature doesn't work with `List[Int => Int]`, but it should.