Hyperelliptic quasi-periodic and soliton solutions of the nonlinear Schrödinger equation