Error recovery

Follow the discussion at #711.

I'm not sure this is sufficient. We have to wait until type check errors pop up in order to test this. Right now we try to clean the solution and clear FCS cache whenever a weird type check error occurs. Exception filtering could be added later.

I think this PR needs a few iterations before it becomes useful. Please help me test it locally.
As it can take relatively long time to clean solution and FCS caches (30 seconds or more on my solution at work), it'd be useful to indicate these processes in the status bar or a dialog (in Debug configuration at least).