copy constructors; use new[] instead of malloc
Merge remote-tracking branch 'upstream/chivector-with-header' into chivector-with-header