Optimal estimation of group parameters using entanglement