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
Check input expressions more strictly against their targets

This can often lead to run-time bugs when the assignment is accidental.