Refactor error matching code.

To make it easier to add new matchers. Also add an action to focus
the entry field.
Fix a couple of buglets.

- Show dockable before focusing entry field.
- Fix NPE when no sbt is running.