Merging latest from netcdf-cmake branch. Includes a handful
of fixes for coverity-identified errors.



git-svn-id: https://sub.unidata.ucar.edu/netcdf/trunk@3308 2e3060e4-1ed8-cf1f-9cc2-9586e844a556