Fixed string type issues in the security checks.
Fixed string type issues in the security checks.

The security checks logic was mixing byte and Unicode strings, resulting
in the server executable file test always failing on Python 3. There
were two parts that were broken:

1. We were passing Unicode strings to `zlib.compress()`, instead of byte
   strings.

2. We were reading file attachment data back from storage as a Unicode
   string and then potentially comparing against a byte string.

We now assert that all test data are byte strings, pass the right type
to `zlib.compress()`, and read the data back from storage as a byte
string, ensuring we're using the same string type everywhere.

Testing Done:
Tested the Security Checks page on Python 2.7 and 3.7.

Reviewed at https://reviews.reviewboard.org/r/10660/

chipx86/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,chipx86/reviewboard