query.c: Support new summary table format

The TIMESTAMPTZ field was removed from the summary table, since it's only
needed during incremental index construction, and not while querying.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
schema.c: Fixed typo leading to ignoring the PATH argument to CREATE TABLE

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Make Spearman's rho calculation 3x faster

We keep the original indexes of array element during sorting, so that we don't
have to search for ranks separately later.

We also add a local quicksort implementation, avoiding the need for the
indirect jumps used by qsort().  This implementation can be further improved
later by taking some learnings from GNU libc's implementation.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Corrected tiebreaker in Spearman's rho

For duplicate values, you're supposed to use the average rank rather than the
minimal rank of the group.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Removed extra empty line (whitespace change only)

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>