Convert plugin build script from Perl to Python

This removes a dependency on Perl for building the plugin
and 7za on Windows.

This also removes platform-specific logic from the build
script in favor of portable functions from the Python stdlib.

MD-20114