The dynamical behaviour of homogeneous scalar-field spacetimes with general self-interaction potentials