Made some delegate methods optional in TreeViewDelegate and ListViewDelegate. Fixed #402: Keep expanded/collapsed state of tree nodes.