db: rework credit_match function
db: rework credit_match function

Make match dictionary the only argument to the function
and extract what we need from the dictionary inside
the function. No functional change. Just a preparation
to separate match-crediting from match entry, so that regular
users can submit pending matches.

Signed-off-by: Ilija Hadzic <47a09d4a4430975766160361f65fc72633be50b6@gmail.com>

ihadzic/jim,ihadzic/jim,ihadzic/jim