make resize of contiguous work

For this to work, I modified the contiguousCodegen function - before it
took the basetypes extent and size as argument, and multiplied it with
count - i modified it so that it takes the datatypes extent and size.