Fix command line argument parsing with Click 6.x
Fix command line argument parsing with Click 6.x

On win32 systems, Click 6.x uses win32 library functions to retrieve
the command line arguments in order to not have their encoding
destroyed. That clashes with rewriting of sys.argv like e.g. the PyCharm
debugger is doing it, causing the debugger parameters to be passed
on to the click parser.

Added a workaround that detects if sys.argv and the os specific
argument list don't have the same length and truncates the os specific
list if that is the case, in order to not pass on arguments from the os
that where already cut off from sys.argv by something else.

shohei/Octoprint,bicephale/OctoPrint,MoonshineSG/OctoPrint,shohei/Octoprint,senttech/OctoPrint,senttech/OctoPrint,Salandora/OctoPrint,beeverycreative/BEEweb,bicephale/OctoPrint,Salandora/OctoPrint,MoonshineSG/OctoPrint,shohei/Octoprint,Jaesin/OctoPrint,Jaesin/OctoPrint,JackGavin13/octoprint-test-not-finished,foosel/OctoPrint,MoonshineSG/OctoPrint,beeverycreative/BEEweb,beeverycreative/BEEweb,Jaesin/OctoPrint,Jaesin/OctoPrint,MoonshineSG/OctoPrint,JackGavin13/octoprint-test-not-finished,senttech/OctoPrint,JackGavin13/octoprint-test-not-finished,shohei/Octoprint,bicephale/OctoPrint,beeverycreative/BEEweb,shohei/Octoprint,foosel/OctoPrint,bicephale/OctoPrint,Salandora/OctoPrint,foosel/OctoPrint,senttech/OctoPrint,JackGavin13/octoprint-test-not-finished,Salandora/OctoPrint,foosel/OctoPrint