Relativistic Hamiltonian dynamics. II. Momentum-dependent interactions, confinement and quantization