Changed the Tree type to be a dict

Now, a tree is a dict of dicts. The advantage is that the tree-related code is
simpler and smaller, and making trees should be easier. You also don't
need to import the class to make a tree. Also, leaves are simpler:
- {"leaf": val}

versus other ways:
- {"leaf": {val: {}}
- Node("leaf", [Node(val, [])])