Grow and shrink the isc_heap array of elements exponentially
Instead of just growing the array of elements in the heap by 1024 increments, grow and shrink the heap as needed by doubling or halving the array used to store the elements in the heap.
Closes #4592