check_pairwise_arrays() preserves type if it is float32

This pull request closes issue #1520.

I made the appropriate changes to `check_pairwise_arrays()`, used it in `additive_chi2_kernel()`, and added some tests.