Make setSelection() work with missing points.

If the points array is missing points, for instance because the data
handler omitted them, setSelection() will now still properly find
the points that are being selected by looking at the points' idx
property instead of just indexing into the points array.
Add a fast-path setSelection() if the points are in the expected place.

In most cases, the appropriate index will contain the point that should
be selected, so check that and use that point if so.  Otherwise, search
for a matching point.

Also add a test that tests the case where the appropriate index doesn't
contain the point we're looking for.
Merge pull request #315 from flooey/setselection

Make setSelection() work with missing points.