Soliton dynamics for the generalized Choquard equation