Annotation Filter

**This is a based on the `unit-testing` branch (otherwise tests don't work), and should probably have that branch checked and merged first.'**

Implements change to comment filter to use mysql_real_escape_string instead of addslashes, which is much more tolerant of specific conditions of the connection, encoding used etc.

* Fixes #30.
* Fixes #148.