hevc: Avoid redundant reallocations for lists of columns and rows.

Also fix a memory leak.
alloc: Add easy memory checker and use memwatch.

The checker is enabled only when LSMASH_ALLOC_DEBUG is defined.