Fix test isolation problems

Turns out our tests weren't testing as much as we thought, because the
Selenium tests clobbered the key-value store, but the scenarios and
usage store survived, so when we loaded scenarios, the definition ids
wouldn't be in the KVS, so they'd get only default values, and no
children.

I've added tests that check for that failure condition, and also
systematically reset all three components (KVS, usage store, and
scenarios) together, so they will be correct for all tests.