pca: use vectors for memory buffers instead of auto_ptr's

* Also, fix data copy between TmpData, which is always float,
  and data_t buffers, which may contain float or double data.