Fix for JIRA - Resource leak in featuregridstatistics algorithm.

Please see commit comments and JIRA ticket https://internal.cida.usgs.gov/jira/browse/GDP-705