Fix internal record names

Change the way the internal names (slugs) for records and media objects that show up in URLs are created.

This adds new commands to change all the existing names, and adds code to update the names whenever an object is changed, so that e.g. the slug for records always matches the record's identifier.

Example:

    python manage.py record_reset_names
    python manage.py media_reset_names