cartesian_product_table: minor decruft
fix buggy test in test_table_to_ndarray

Original test did not really test the correctness of the value variable
names.
fix incorrectly named 'value' column
refactor make_test_table, ndarray_to_table

...so that they use a common constructor for the table (the new
make_table function); this increases the chances that the
table_to_ndarray <-> ndarray_to_table roundtrip is close to the identity
map (at least for the happy-path tables produced by make_test_table).