JSON import/export

Here's my first attempt at JSON import/export for cobra models. I'm sure it's not bulletproof, but it's a start.