Refactoring Switching Code

This PR refactors the switching code to loosen the dependencies upon the first-order solver library. It also includes a variant of the switching model that lacks the stability constraints in the usual model. (This variant serves as a negative control to understand why the stability constraints are necessary).

@rmcgibbo, @kyleabeauchamp: I'd appreciate it if one of you could take a quick look at the code. If neither of you has any comments, I'll go ahead and merge this in a couple of days.
sample_fixed allows the user to query for a sample from a particular metastable well, while sample generates the sequence of metastable states according to the generative distribution.