Develop

I only needed to submit one commit (I used squash from a separate branch, like you instructed) but for some reason a bunch of your commits are coming through along with mine.

The one commit I have is for fixing the gillespieMeanOnGrid and gillespieMeanSDOnGrid memory leaks by writing the functions out. They're really long, but in the interest of clarity I'm following your suggestion and writing everything explicitly instead of using auxiliary functions. There's also one more commit where I synced the changes in develop.