[1.5.x] Fixed #19807 -- Sanitized getpass input in createsuperuser

Python 2 getpass on Windows doesn't accept unicode, even when
containing only ascii chars.
Thanks Semmel for the report and tests.
Backport of 02e5909f7a from master.