Fix script for graphing entities

PR #1220 simplified the implementation of the `OneToOneField` and
`OneToManyField` classes. Both classes now record which kind of entity they
point to in the instance variable "entity". Formerly, only the `OneToManyField`
did this, and the `OneToOneField` used a variable named "model".

Fix `scripts/graph_entities.py` to deal with this change.
Merge pull request #1226 from Ichimonji10/graph-entities

Fix script for graphing entities
When making API calls, provide "data" not "params"

Then using the requests library (or our wrapper), one can provide the "data" and
"params" arguments. The "data" arguments can be encoded (e.g. as JSON), but the
"params" arguments are encoded directly in a URL.

When communicating with the API, it is sensible to provide all arguments through
a single channel. This change ensures that, whenever possible, all arguments are
passed to the API as JSON-encoded data.