This moves the univalue subtree to be similar to core as per core#25113.
The changes that have been pulled by upstream 1.1.1 as well as the other performance improvements are kept.
We are going to use our own version of univalue just like core; it makes no sense anymore to use the upstream univalue repo (https://github.com/jgarzik/univalue) as it has been archived and is no longer maintained.
Since some of the changes have been upstreamed, it makes no sense to pull these backports one by one as it would involve code reverals.
Backport of core#14164, core#17324, core#20424, core#22646 and core#25113.