Replace transform by vectorized_transform.

Fix a few bugs in vector.h and vector.templates.h

Replace initialize_val by allocate and clear_val by deallocate.

Add vectorization to changes.h

Move allocate and deallocate to vector.templates.h