cmake: increase template depth if necessary
fixes and improvements in ChunkedArrayHDF5
merge with 'master' and improvements in ChunkedArrayHDF5
gcc compatibility fixes