More robust checking for only nil values in results data tables

Previously, nil/undefined values were tracked, and removed from the
array after the array had been built. This includes a bug when multiple
entries have only nil values, since we removed by index. Modifying the
array changes the indexes.

Now, instead, we construct an array where the sub arrays are the
results, and check if those only contain nil values. To adhere to the
correct format for Google Charts, we transpose the array before sending
it to the chart.