This MR should be merged only after MR !775 (merged). It contains the transplated commits from MR !775 (merged), and it uses the new feature to fix the return values of HPy functions after translation. I will post the buildbot results here as soon as they finish.