Unbounded components of solutions of nonlinear equations at resonance, with applications to elliptic boundary value problems