bash: add helper function to get config variables for completion

Currently there are several completion functions that perform similar
queries to 'git config' to get config variable names: the completion
of aliases, pretty aliases, remotes, and remote groups for 'git remote
update'.

Add a helper function to unify those 'git config' queries and avoid
redundant code.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>