varray::resize should not re-allocate when resizing to smaller sizes

Simple hack so that resize won't re-allocate memory if not necessary.