Fix simple application

Don't expect the types to be inferred immediately. If the types of the
arguments are not solved immediately, push their holes to the end of the
hole queue rather than failing with a Can't Infer Type error.

Also fix for linear patterns - don't erase a repeated name in a function
application.