This patch is baased on the one posted by Mario Lobo in bug 244212.
I have tested patches and regenerated them, two patches were also generating warnings which I cleaned up.
This also migrates the port to python3. Tested on my machine and it works, but firther testing is required, especially by people using the python interface.
I could not find any new CVEs for VirtualBox since 5.2.34, so I'm not touching vuln.xml.
Please if I'm mistaken regarding vulnerabilities please point me in the right direction.