Greatly improved the performance of crossprod

Also fixed some bugs, updated docs, added PCA as an example for
crossprod