[#4287] Fix the undefined evaluate_match error when comparing functions
Ticket #4238 introduced a problem that a function couldn't compare to
another value until after it was evaluated, and AST::Function didn't have the
evaluate_match method. This change moves that method from AST::Leaf to AST.
The special casing necessary for doing comparisons between AST objects
feels messy and could probably be encapsulated better. I've created
ticket #4291 to remind us to refactor this at some point.
Paired with: Nick Lewis
Signed-off-by: Matt Robinson <matt@puppetlabs.com>