Make DList.partition work with nonepure funcs
merged with 1baa4e and fixed the test. fixes #265
fixed the failing test for partition in inmemory mode