Fix Dict insert bug by using generalized balance function

Also removes now dead code and rearchitects a few things to statically
eliminate possible future bugs.
Remove comment for things that no longer exist
Merge pull request #445 from maxsnew/dict

Fix Dict Bug
Give more reasonable names to incoming and outgoing ports
make conversion functions for input ports optional
Simplify SourceSyntax.Type AST, making record extension more restrictive as discussed with @maxsnew
Make the fix from #435