IMPALA-1520: Fix AnalyticEvalNode Close for fn ctxs when Init/Prepare fails

If Init() or Prepare() fails, some or all fn ctxs may not have been
created. Close() should only cleanup fn ctxs that were actually created.

Change-Id: I301897ebf837273215d1e1e9005b127ff13dfa30
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5397
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 09363ef8d55b7cb63dcfcf9d677ebd288f0a1600)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5407
Reviewed-by: Matthew Jacobs <mj@cloudera.com>