Moved collections into common base class.

AvaloniaCollection<T> now hopefully contains most of the logic needed
for WPF collections.