Fix collection modified exceptions
Fix collection modified exceptions

There was a conceptual issue where the merge operation merged all inner
config scopes into the first loaded table. This was OK till now as
before the newly introduced load/save optimizer no threading happened
yet. But the optimizer creates threaded code to perform its
optimizations.

When the loaded table is used as the merge target, it can happen that a
merge is in progress while the next load is already happening. Although
this didn't lead to detectable failures till now (as without the
optimizer load always returned a new instance and threads were not used
yet) conceptually this is wrong no less.

The merge table has to be a new table t = f(f(f(E, s1), s2),..., sn)
instead of t = f(f(f(s1, s2), ..., sn) where E is the empty table.
Otherwise source table s1 can become
s1' = f(f(s1, s2), ..., sk) | k < n and therefore get modified while the
operation is performed => boom.

Existing unit tests that get fixed with this commit detected this case.
Making specialized unit tests only for that case would be very hard.

This case shows that immutable TomlTables would be nice to have...
maybe in version 2.0 :-).

paiden/Nett