fix for crash causing bug in zopflipng

In zopflipng_lib.cc::TryOptimize, the custom_context is set for the lodepng's
decoder using a stack local variable that quickly goes out of scope:

136  if (use_zopfli && png_options->use_zopfli) {
137    ZopfliPNGOptions custom_context = *png_options;
138    state.encoder.zlibsettings.custom_deflate = CustomPNGDeflate;
139    state.encoder.zlibsettings.custom_context = &custom_context;
140  }

Thus, when the custom_context gets referenced later, undefined behavior occurs.
Fix misc cppcheck warnings.