Peloton posted a surprise profit in its fiscal fourth quarter but said it still has plans to cut costs by reducing its workforce and renegotiating contracts.