Use a list for Task.datasets instead of a dictionary.

The dictionary was a silly idea. This is much cleaner.
Convert remaining id-indexed dictionaries into a list.