The helper module bignum.py in the functional test framework provides only one function that is used outside the module (bn2vch) and it is used only in script.py, Remove bignum.py and move the function to script.py
PR17319 introduced a bug, so I had to merge also a commit from PR18378 which rewrites entirely the function bn2vch
This is a backport of Core PR17319
Additional bugfix commit:
The rest of PR18378 will be in a separate diff.