test_*: use b'' literal instead of bytes

to be a bit more consistent
AuthCookie: allow ints in _expiry
bn_rand_range: use PyUnicode_AsUTF8 to fix segfault
File: use fd based approach

Use file descriptor instead of filename, when opening BIO.File

Fix a few issues in test_bio_file:
  * in tearDown close the fd opened in setUp, not the filename, so test
    no longer leaks file descriptors
  * add a hacky check for the fd leak between tests
  * fix a few ResourceWarnings by closing opened files
test_rsa: python3 fixes
update TODO