Fixes #17289, and follows up on #18606
Adds a functional test that parses available RPC commands, generates the associated bitcoin-cli autocomplete file and checks that the current autocomplete file matches.
An outdated autocomplete file can be updated via the –overwrite test parameter.