Fix auto-chunking hang with large datatypes (Issue 253)

The auto-chunker entered an infinite loop if the datatype size was larger than the maximum allowed chunk size (cause of issue #253 ).  Adds an exit condition and a unit test.