Lyft will end its dockless bike and scooter services and lay off about 1% of its employees as part of a restructuring effort.