Longitudinal Control for Self-driving Cars with Traffic Flow Considerations: Theory, Design, and Experiments