Add ason_remove_items

We take items out of the item list often. It's about time we grew a helper
function to avoid logic mistakes.

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Fix union reduction between order 0 and order 2 values

We were collapsing the order 0 values into the order 2 values incorrectly. This
has been remedied.

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Remove value_test dependency on iterators

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Remove internal universe and wild types

As the spec states, these are just syntactic sugar over complements
fundimentally. We simplify several code paths by treating them as such.

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Correct algorithm for checking representation in order 2 objects

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Add missing return statement to ason_reduce_intersect

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Splay objects after reducing

We need to turn objects containing unions into unions containing objects so we
can compare the two forms correctly. We've added a testcase to verify this
functionality.

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Minor refactoring in ason_compare

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Use ORDER_UNKNOWN constant where appropriate

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Perform splaying for lists as well as objects

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Remove unused value from ason_reduce_list

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Introduce CHILD_VALUE macro

We can now access child values as an lvalue regardless of whether they are in
kv pairs or just the item list. This makes a lot of code much simpler.

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>