GROOVY-1628: Final variable inference

This PR should not be merged as is because work is incomplete. It is intended to start the discussion. The idea is to have a visitor which performs final variable inference. That is to say that it is not only capable of checking that a final variable should not be reassigned, but also that a variable is effectively final.

The latter is important for bytecode and performance optimizations (like not wrapping closure shared variables in case they can be passed directly).
This is already handled, because the boolean expression is outside of the push/pop scope, but I added a test case for it. Thanks for the idea :)