Fix AliasDict for variable bounds
Setting bounds on a negative alias should not only invert the values of the min and max, but also switch them around. Furthermore, we should make sure that we keep tuples as tuples, instead of converting them to lists.
Note that AliasDict is internal API, and we assume that all tuples are of length two, and are representing bounds.
Closes #1124 (closed)