SPH methods for a 1D elastic model problem: error analysis and development of a second-order accurate formulation