Add ID correlation code to client and server.
Fix issue with multiple inserts.

It turns out that inserted_primary_key doesn't do what I need.  A
returning clause would work, except we're in lowest-common-denominator
land right now.
Make candidate keys for terms and courses tables.

Building the logic to relate these into the client requires stronger
uniqueness guarantees about the provided data values.