dict: Write dict_foreach_* in form of dict_foreach_match

Change-Id: Iaa3454f7f3b6516660b1976bea63e39ea7795f8f
BUG: 1164051
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/9121
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>