Method for removing unused errors.
After merging #898, errors are based solely on `buffer_id`. This necessitates a new way to remove unused errors.

Quoting @kaste:
> We need to add some logic to remove bid from errors when it's not used anymore.

> This can be tricky. Generally we can multiple views into the same buffer. So we can remove only if this view here is the last one. But one has to check/test how we can iterate here over window.views() for example. Is this view here still in window.views(). What if the user closes the window?
diff --git a/sublime_linter.py b/sublime_linter.py
index 3f35c52..8aad5a0 100644
--- a/sublime_linter.py
+++ b/sublime_linter.py
@@ -147,6 +147,21 @@ class Listener:
 
         queue.cleanup(vid)
 
+        bid = view.buffer_id()
+        buffers = []
+        view_count = 0
+        for w in sublime.windows():
+            for v in w.views():
+                view_count = view_count + 1
+                buffers.append(v.buffer_id())
+
+        if view_count <= 1:
+            # Wipe clean after last view closes
+            persist.errors.clear()
+        elif buffers.count(bid) <= 1:
+            # Remove bid from persist.errors if it's the last view on the buffer
+            persist.errors.pop(bid, None)
+
     def on_hover(self, view, point, hover_zone):
         """On mouse hover event hook.
 
['sublime_linter.py']