This template method is used by OpenEye toolkit grid handling
to safely multiply the 3 dimensions of a grid together while
ensuring it does not overflow the size of the OutputType
integer type. If the multiplication of xdim, ydim, and
zdim would result in an integer overflow, 0 will be
returned instead. If the multiplication can be safely performed,
the total resulting grid size is returned.