analyser: check for unused variables and functions

Still need to support the recipe option $warning no_unused