[backport#16620] util: Move ResolveErrMsg to util/error
Summary:
Pull request description:
Pull request https://github.com/bitcoin/bitcoin/pull/16248#discussion_r314035862 duplicated the body of this util function. The whole point of the util function is to be shared, so do that here as a fixup to #16248
https://github.com/bitcoin/bitcoin/pull/16620/commits/fa27c55b0593c769b6ad87de0b59df3816d73548
Backport of Core PR16620
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7045