Halve the size of dlist.

* Same changes as slist in an earlier commit.

* Also fix some bugs in slist along the way.