what factors enabled andrew hadkson to defeat john quincy adams in the 1828 election