[Backport]Add some general std::vector utility functions
Summary:
Added are:
- Vector(arg1,arg2,arg3,...) constructs a vector with the specified arguments as elements. The vector's type is derived from the arguments. If some of the arguments are rvalue references, they will be moved into place rather than copied (which can't be achieved using list initialization).
- Cat(vector1,vector2) returns a concatenation of the two vectors, efficiently moving elements when relevant.
Vector generalizes (and replaces) the Singleton function in
src/descriptor.cpp, and Cat replaces the Cat function in bech32.cpp
Add tests for util/vector.h's Cat and Vector
Backport of Bitcoin Core PR16889
Test Plan: ninja && ninja check
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, majcosta, deadalnix
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, majcosta, deadalnix
Subscribers: majcosta
Differential Revision: https://reviews.bitcoinabc.org/D7502