Periodic and homoclinic orbits for Lorentz-Lagrangian systems via variational methods