This bumps the univalue subtree and changes two lines of our code. Apart from the get_int -> getInt change, this is mostly a rebase of #15975, which was closed back then. However, given the numerous UniValue copy bugs and performance regressions in the past years, I think it makes sense to finally go through with the changes and disable potentially expensive implicit UniValue copies, which may cause OOM. The changes here are not strictly required for that, but make future changes less verbose and easier to review.
Backport of core#25249.
Depends on D16273.