Consolidated all tests for createsuperuser in the same TestCase.
Removed BaseCommand.stdin introduced in 116d39842dab2569013856e9f3701a7cb6554f09.

This option is not actually very useful in the general case
because it doesn't override sys.stdin.

It's still marginally useful for testing some features of
the createsuperuser command so it was moved there.
This commit also makes the detection of a TTY in createsuperuser
a bit more robust, after a suggestion of appolo13.
Fixed broken tests when running with a non-TTY stdin.