Pass the maxlength attribute from models.TextField to forms.CharField (#22206)

Pass this to the widget as the maxlength attribute, regardless of its class,
so that it works on Textarea and any other widget that you might choose to
use for a CharField.

See https://code.djangoproject.com/ticket/22206 for more details.