Mass. cop released from hospital after being shot in face