vfs: modernize the detection of the main thread
There weren't a lot of good choices when py27 was supported, but starting with
py34, `threading.main_thread()` is available. This gets us away from an
undocumented, internal symbol, and drops a pytype suppression statement. It is
also apparently no longer reliable after a process fork.[1][2]
[1] https://stackoverflow.com/a/
23207116
[2] https://github.com/python/cpython/blob/v3.6.3/Lib/threading.py#L1334
$ hg init repo
$ cd repo
$ touch unknown
$ touch a
$ hg add a
$ hg ci -m "1"
$ touch b
$ hg add b
$ hg ci -m "2"
Should show unknown
$ hg status
? unknown
$ hg revert -r 0 --all
removing b
Should show unknown and b removed
$ hg status
R b
? unknown
Should show a and unknown
$ ls -A
.hg
a
unknown