Perform explicit list deletion in CCSEdgeLocator.

The vtkClipClosedSurface helper class vtkEdgeLocatorNode would
delete the whole node list in its destructor.  This is a bad
idea, because because if the implicit copy constructor is called
on a node, and the copy destructs, then the list will partially
destruct.  Add a FreeList() method that is called explicitly when
the list is to be freed.

Change-Id: I8945dc1682b6a70f66561b1f4155ed22be6fb0d6
Fix problems processing polyhedron connectivity.

Several filters incorrectly process polyhedra because of
misunderstandings of how their connectivity is stored or
simple math errors in computing connectivity offsets.
Fix them.

Change-Id: Icce8becea56567b869277d0d265e3f9092b7eb98
ENH: Remove superfluous IMMEDIATE option from CMake CONFIGURE_FILE

In CMake 2.0 and higher (since 2005), the IMMEDIATE option to
CONFIGURE_FILE is implicit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9cc368a

Change-Id: I60e48f767d33e0a364dfc9cafd9821836b2f3f43
Merge topic 'CMake-Immediate' into master

1f965eec ENH: Remove superfluous IMMEDIATE option from CMake CONFIGURE_FILE
Don't forget to copy polyhedron cell-data...

... when appending datasets.

Also, clear out point-list when GetFaceStream fails.

Change-Id: Icf502a95ec8bfacc634291c6ef749d3cbdff5df9
Fix polyhedron-ray intersection...

... by properly resizing point and point-id arrays for
each polygonal face before intersecting with the ray.

Change-Id: I24b7053428e50152c8e10fcb240a56a924e772ce
Reset point ID list when appending polyhedra.

Change-Id: I0d5ef2af0323e57ef08de64235a34f4672f3bb9f
Terminate early when possible.

Change-Id: Ibcd1bb931c4f72960a3c997bf4d84653516d70f4
Reads past EOF are expected

The vtk3DSImporter reports errors like :

ERROR: In /home/kevin/kitware/VTK/IO/Import/vtk3DSImporter.cxx, line
1083
vtk3DSImporter (0x75cd20): Pre-mature end of file in read_word

on almost every machine in the dashboard.

I did a bit of poking around with gdb and std::cerr, and it looks like
these reads past the end of the file are not at all unexpected.

For example parse_face_array uses read_word to read the number of faces
and then to read what I assume are the face vertex ids: a failure here
is catastrophic.

Then even though importer->GetFileFD() could be at the end of the file
it calls start_chunk which calls both read_word and read_dword to see if
there is another (sub?)chunk to parse into.

This commit adds two new functions peek_word and peek_dword that are
exactly like read_word and read_dword except that they do not report an
error when they read past the end of the file.

peek_word and peek_dword replace read_word and read_dword in start_chunk
where the read past the end of the file is not an error.

read_dword is now unused

Because read_dword is now unused, it should be removed.

Stop leaking render windows

Hopefully X and Mesa have advanced to the point where we can delete the
render window without error.

If any tested configurations still have trouble let us work around them
more precisely.

Change-Id: I90a68d1241379886d38d150ba00816d869c6675f
Merge topic 'ExpectEOFsIn3DS' into master

631d795b Reads past EOF are expected
Merge topic '14188_polyhedron_fixes' into master

0627519c Terminate early when possible.
fc0ee6cf Reset point ID list when appending polyhedra.
ee3a7c30 Fix polyhedron-ray intersection...
31d834a4 Don't forget to copy polyhedron cell-data...
2f4a9cad Fix problems processing polyhedron connectivity.
Merge topic 'ccs-edge-locator-free' into master

9b46579d Perform explicit list deletion in CCSEdgeLocator.