Fixed #5711: serialize doesn't work with extra()

Added 'extra' argument for serialization of non-field attributes.

This fixes https://code.djangoproject.com/ticket/5711