Moved the PIDE error extraction code to a new utility function
Also print errors when the PIDE Coq editor's caret moves