Update discovery

This code is pretty ugly.  I think it's getting less ugly but it's still pretty incomprehensible.

It does works significantly better though...
```
In [2]: discover([[1, 2, 3], [1, 2], [1, 2, 3, 4, 5]])
Out[2]: dshape("3 * var * int64")
```