deque: generalize grow() to resize(); implement shrink() in terms of resize()