SimulationLog fixes for postgres.

Postgres is more strict than sqlite. It (correctly) demanded that if I were to say
 FOREIGN KEY (farm_id) REFERENCES farm(id)
I needed to actually say
 FOREIGN KEY (run_id, time, farm_id) REFERENCES farm(run_id, time, id)
because by itself, (id) is not a key for farm.

My solution works but it's flakey. SQLAlchemy is wonderful but it was never designed
to support SQL sleight of hand, which, of course, is exactly what I want from it.
Eutopia: now usable with postgres, and hence with web replication.