[tests] Add test for frame size == hop size
[segment] Tidy up memory allocation.

Make sure that arrays that depend on the current
hop size and/or frame size are updated when
those values are changed.