mlx5: Move dump error CQE function out of mlx5_ib for code sharing