Fixed a memory leak bug and enhanced error handling in build_index().
Fixed a memory leak bug and enhanced error handling in build_index().

komainu8/groonga,myokoym/groonga,myokoym/groonga,komainu8/groonga,hiroyuki-sato/groonga,komainu8/groonga,kenhys/groonga,komainu8/groonga,kenhys/groonga,cosmo0920/groonga,redfigure/groonga,groonga/groonga,cosmo0920/groonga,myokoym/groonga,hiroyuki-sato/groonga,hiroyuki-sato/groonga,myokoym/groonga,redfigure/groonga,komainu8/groonga,naoa/groonga,redfigure/groonga,komainu8/groonga,naoa/groonga,hiroyuki-sato/groonga,cosmo0920/groonga,naoa/groonga,naoa/groonga,redfigure/groonga,myokoym/groonga,groonga/groonga,groonga/groonga,hiroyuki-sato/groonga,hiroyuki-sato/groonga,groonga/groonga,groonga/groonga,hiroyuki-sato/groonga,kenhys/groonga,cosmo0920/groonga,naoa/groonga,naoa/groonga,redfigure/groonga,komainu8/groonga,myokoym/groonga,redfigure/groonga,cosmo0920/groonga,kenhys/groonga,redfigure/groonga,cosmo0920/groonga,groonga/groonga,kenhys/groonga,redfigure/groonga,myokoym/groonga,myokoym/groonga,groonga/groonga,hiroyuki-sato/groonga,cosmo0920/groonga,naoa/groonga,komainu8/groonga,kenhys/groonga,kenhys/groonga,cosmo0920/groonga,kenhys/groonga,groonga/groonga,naoa/groonga