Update Scaffolding, Script Events moved to wallets and added to synchronization

The biggest feature of this PR is that script events (responsible for preventing scripts from running multiple times) have been moved from being a part of the state to being a part of the wallet, and the events have been integrated with the synchronization process.

I've also added some tests that make sure synchronization is smooth when dealing with events, and that all of the siblings add and remove the events together.