What factors affect how much the cue ball swerves?
See “Squirt – Part VIII: squerve effects” (BD, March, 2008). It summarizes and illustrates all of the important factors and effects. A complete summary of all squirt, swerve, and throw effects can be found here. See also: squirt, swerve, and throw confusion. And for demonstrations of how squirt and swerve combine on different types of shots, see squerve.
Why doesn’t the CB curve when struck with a perfectly horizontal cue?
The videos, explanations, and links on the OB turn resource page help explain this.
You can actually make the CB curve in the opposite direction than expected by shooting up on the CB (with negative cue elevation), for example, by shooting with sidespin up at a CB sitting on a piece of chalk on the rail. So if the CB curves one way when striking downward, and curves the other way when striking upward, it must not curve at all when striking horizontal.