Context

This PR adds a notion of a simulation context, removing the need for singletons, and allowing much easier testing and future parallel computation.

Note that this is almost entirely @rwcarlsen's work. I'm just opening the PR because we worked together on the cycamore updates that required changes to the testing code in the core.

Closes #567.

Feel free to edit and add more, @rwcarlsen.