Merge master into writable-nested-modelserializer

@tomchristie I've merged the latest master into the writable-nested-modelserializer branch.  I fixed a merge conflict in relations_nested and fixed some deprecation warnings.

Regarding the conflict, I believe the changes that caused it are from 4bf1a09baeb885863e6028b97c2d51b26fb18534.  I simply chose the writable-nested-modelserializer version.