Captive portal bugs & PEP8

 Fixed 4 bugs:   
    - Inconsistence in the get_random_url_safe_string between the
      initial and returned lengths.
    - Variable resolved_auth_ns undefined in check_0x20_to_auth_ns
      when a sample_size was given.
    - Condition unreacheable in compare_random_hostnames.
    - Double checking for isalpha in get_random_hostname and get_random_url_safe_string

It has also been improved the conformance to PEP8.