Added test to ensure that we can delete more than 1000 nodes.

In sqlite there is a hard limit to the number of records which can be
selected with the "IN(x, x, x ...)" syntax which previously caused
operations like this to fail.