Fixed #21832

1st commit: Updates code, tests and docs.
2nd commit: Way to create fk instance at command line.
Well there is no specific need. Just added it to show that checks work fine even when `USERNAME_FIELD` is fk.