Optimal Path Planning and Following for Autonomous Race Cars