NHL, NHLPA reach agreement to end lockout