ENH: Support PostgreSQL in filter data functions

Tested-by: Nils Gladitz <nilsgladitz@gmail.com>
ENH: Add menu to viewNotes page

Also drop some unused variables; Move <pre> tags outside of <p> tag;
BUG: Generate xhtml to make markdown standard compliant
BUG: Fix incorrect queries in filters.

This commit fixes the following error:

   Unknown column 'u.updateid' in 'where clause'