Split API classes and interfaces

This may be too many objects, but I preferred this to an array of tuples containing "index" and "_id" keys.

If we have to follow the spec here, my understanding is that it'd need to return the Upsert object directly if there was only one, and use arrays if there were multiple. That doesn't sit well with our "one return type" rule.