Lidar makers Ouster and Velodyne have agreed to merge, combining roughly $400 million in market value.