Improve undeclared variables linter rule
Summary: Currently ArcanistUndeclaredVariableXHPASTLinterRule does not properly handle anonymous closures.
Test Plan: Added test cases.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: johnny-bit, Korvin
Differential Revision: https://secure.phabricator.com/D13795