Metric and strong metric dimension in commuting graphs of finite groups