[SPARK-3300][SQL] Should clean old buffer after copying its content

The function `ensureFreeSpace` in object `ColumnBuilder` clears old buffer before copying its content to new buffer. This PR fixes it.