Fixed #21832

1st commit: Updates code, tests and docs.
2nd commit: Way to create fk instance at command line.
@timgraham 
I should be doing the refactoring for `USERNAME_FIELD` only or for `REQUIRED_FIELDS` also, as the code snippet you mention is of the latter.