Use PyUnicode_FSConverter() for file name

This function was only added in Python 3.1. This change was only tested by
artificially calling the open_tmp_file() callback, because I could not find
an easy way to trigger it in normal usage.
Move module definition structures to global level with method lists
Use PyUnicode_CompareWithASCIIString() instead of encoding Unicode