Change velocity on ball bounce correctly, fixes #2

For some reason the ball would go through two update cycles beyond the bounds and hence switch the direction of the velocity twice.  This essentially causes an oscillation that never gets resolved.  This patch just makes a more intelligent direction change.