invalidate after changing connections

tests.py
* test_change_flow_structure_between_two_calls_to_run(): test added for
new functionality
* test_mean_with_two_calls() : add names to elements & connections to
ease debugging

models.py
* go back to a boolean "valid" parameter on connectors instead of a
valid_id
* add an invalidate() function on Connector and Element
* add a "main" invalidate() function on Flow, which carries forward the
necessary invalidations