Index estimates for strongly indefinite functionals, periodic orbits and homoclinic solutions of first order Hamiltonian systems