IMPALA-1520: Fix AnalyticEvalNode Close for fn ctxs when Init/Prepare fails
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 <99a5e5f8f5911755b88e0b536d46aafa102bed41@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 09363ef8d55b7cb63dcfcf9d677ebd288f0a1600)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5407
Reviewed-by: Matthew Jacobs <df2fa7c39d141dc5dc5589fed74180e757ed6c9a@cloudera.com>

placrosse/ImpalaToGo,tempbottle/Impala,ImpalaToGo/ImpalaToGo,cloudera/recordservice,lnliuxing/Impala,cloudera/recordservice,tempbottle/Impala,kapilrastogi/Impala,bratatidas9/Impala-1,brightchen/Impala,placrosse/ImpalaToGo,placrosse/ImpalaToGo,cloudera/recordservice,ImpalaToGo/ImpalaToGo,henryr/Impala,brightchen/Impala,cgvarela/Impala,brightchen/Impala,theyaa/Impala,bratatidas9/Impala-1,bowlofstew/Impala,lirui-intel/Impala,kapilrastogi/Impala,bratatidas9/Impala-1,lnliuxing/Impala,rdblue/Impala,brightchen/Impala,tempbottle/Impala,gerashegalov/Impala,lirui-intel/Impala,cgvarela/Impala,lnliuxing/Impala,bowlofstew/Impala,brightchen/Impala,caseyching/Impala,kapilrastogi/Impala,theyaa/Impala,caseyching/Impala,caseyching/Impala,caseyching/Impala,cchanning/Impala,XiaominZhang/Impala,scalingdata/Impala,henryr/Impala,bratatidas9/Impala-1,brightchen/Impala,lirui-intel/Impala,bowlofstew/Impala,lirui-intel/Impala,tempbottle/Impala,cgvarela/Impala,rdblue/Impala,caseyching/Impala,scalingdata/Impala,grundprinzip/Impala,theyaa/Impala,cgvarela/Impala,XiaominZhang/Impala,scalingdata/Impala,gerashegalov/Impala,lirui-intel/Impala,grundprinzip/Impala,tempbottle/Impala,caseyching/Impala,kapilrastogi/Impala,bowlofstew/Impala,lirui-intel/Impala,XiaominZhang/Impala,rdblue/Impala,bowlofstew/Impala,cloudera/recordservice,scalingdata/Impala,grundprinzip/Impala,bratatidas9/Impala-1,XiaominZhang/Impala,gerashegalov/Impala,cloudera/recordservice,placrosse/ImpalaToGo,grundprinzip/Impala,kapilrastogi/Impala,henryr/Impala,lnliuxing/Impala,cchanning/Impala,gerashegalov/Impala,grundprinzip/Impala,XiaominZhang/Impala,scalingdata/Impala,cgvarela/Impala,kapilrastogi/Impala,lirui-intel/Impala,theyaa/Impala,bowlofstew/Impala,theyaa/Impala,tempbottle/Impala,XiaominZhang/Impala,lnliuxing/Impala,theyaa/Impala,bowlofstew/Impala,lnliuxing/Impala,cchanning/Impala,gerashegalov/Impala,grundprinzip/Impala,gerashegalov/Impala,theyaa/Impala,cchanning/Impala,rdblue/Impala,ImpalaToGo/ImpalaToGo,caseyching/Impala,ImpalaToGo/ImpalaToGo,henryr/Impala,kapilrastogi/Impala,scalingdata/Impala,placrosse/ImpalaToGo,henryr/Impala,cchanning/Impala,cloudera/recordservice,cchanning/Impala,gerashegalov/Impala,rdblue/Impala,ImpalaToGo/ImpalaToGo,cchanning/Impala,rdblue/Impala,cgvarela/Impala,rdblue/Impala,cloudera/recordservice,brightchen/Impala,placrosse/ImpalaToGo,bratatidas9/Impala-1,XiaominZhang/Impala,henryr/Impala,cgvarela/Impala,lnliuxing/Impala,tempbottle/Impala,bratatidas9/Impala-1,ImpalaToGo/ImpalaToGo