Remove 'ambiguous' from depset.

I have a plan to consolidate this with inputs and outputs into a single dict
that should make things a bit cleaner. Also noticed while doing this that we
were leaking the memory of 'ambiguous' when destroying a depset.
Consolidate inputs and outputs into a single dictionary.
Remove no longer used set implementation.
Fix header dependencies.