Warn on unused variables

To do this, we maintain an initially empty bitmap, updating it every
time a variable is used, and report any unset bits after the entire
function has been checked.  We have to do some extra work to make sure
we don't report any of the PL/PgSQL's internal variables as unused.

Also IN/OUT variables are never considered unused, though that could be
added later.  The reasoning here was that they are considered part of
the function's API, and thus warning about them is likely more annoying
than helpful.
Fix a couple of compiler warnings
Merge pull request #3 from johto/unused_var

Warn on unused variables
Merge pull request #5 from johto/compiler_warnings

Fix a couple of compiler warnings
Move the details for unused variable to the DETAIL line

It was inconsistent to have this in the CONTEXT line.
Merge pull request #6 from johto/unused_variable_ctx_to_detail

Move the details for unused variable to the DETAIL line
Fix bug in unused variable tracking

Variable usage was not tracked correctly for known rowtypes.

Per report from Steeve Lennmark.
Merge pull request #7 from johto/unused_variable_bugfix

Fix bug in unused variable tracking
backport to 9.2 -- support for event triggers is removed on PostgreSQL 9.2
Update README.md

fixed some grammar
Merge pull request #8 from renzok/patch-1

Update README.md
new check of resulted and expected tuple descriptor for statement
RETURN QUERY.

ToDo: do same with RETURN NEXT
more stricter check of assign expressions to target variables

based on pullrequest #4 by Johto with my significant redesign
types of returned values are checked now.
fix handling of RETURN expression in RETURNS tuple function
increase version to 0.9
fix typo in message
fix hangs on anonymous code blocks
* fix typo
* better check of fori stmt expressions
* better check of boolean condition of while and if stmts
enhance documentation - mass check, trigger checking