Avoid infinite loop in readFontTable when ConEmu has adopted the console
Avoid infinite loop in readFontTable when ConEmu has adopted the console

If we're only examining the table for debugging purposes, then read only
first 1000 fonts and dump them.

If we're reading the font table on XP, then use the undocumented
GetNumberOfConsoleFonts API.  Avoid this API on Vista and up, because it's
undocumented.  It ought to be stable enough on XP.

When ConEmu has adopted the agent console (e.g. there is a ConEmu tab for
the agent's console), then every font in the table will have the same size.
(For now, anyway.  Obviously, the ConEmu author may decide to change the
behavior.)

When `WINPTY_SHOW_CONSOLE=1` is set, and when ConEmu's "Process 'start'"
flag is set, ConEmu will still adopt the winpty-agent console.  It seems
that this case is still broken (on Vista and up), because winpty.dll
notices that its pipe clients have the wrong PID.  I'm not sure what to do
about this.  `WINPTY_SHOW_CONSOLE=1` is strictly intended for debugging
winpty, though, so there's no useful need for ConEmu to adopt the console.
There's no way for me to opt out.  I could disable the security check when
I detect ConEmu, but that's hazardous, and I'm not a fan of the API hooking
anyway.

winpty prints a content-free error, "Error creating winpty." in the above
case.  The error report could be improved to include the traced() error,
"Security check failed: pipe client pid (7492) does not match agent pid (7416)".

Second part of a fix for
https://github.com/rprichard/winpty/issues/70

fracting/winpty,fracting/winpty,rprichard/winpty,fracting/winpty,fracting/winpty,rprichard/winpty,rprichard/winpty,rprichard/winpty