Implement new AutoGenerator mixin and refactor agent sort_names

- replace AutoIdGenerator with a more flexible AutoGenerator to support generation of all types of properties.
- move auto-generation of sort_name from the frontend to the backend
- refactor agent frontend forms to use the shared/subrecord_form template/behaviours