* Ran `2to3` on `tools/buildgen` and the `gen_build_yaml.py` files.
* Updated the invocations of python to be explicitly Python 3.
* Changed the loader in `mako_renderer.py` to allow pickle to find the module for pickling `external_version.Version`
* Added a few open-as-binary to placate readers/writers expecting bytes.
* Hand tweaked the templates to remove `iteritems` and fiddle with encodings.
Partially addresses #24359.
-) You can't assume bash is installed. Scripts needs to be cleaned out of bashisms.
-) You can't assume python is in /usr/bin. Use env instead.
-) AF_INET is in sys/socket.h
-) Added port_platform's basic structure for FreeBSD, based off Darwin.
-) FreeBSD doesn't have and doesn't need libdl for OpenSSL.