Two important changes: 1) changed the destruction of the ticker threads at systhread context finalization to be synchronous: this is important for ensuring that the masterlock is not used after context destruction;  2) correctly destroyed the dynamically-allocated part of named_value_table, for each context.