Boundary Control for Stability and Invariance of Traffic Flow Dynamics: A Convex Optimization Approach