Ride-sharing company's agreements were largely ruled by an appeals court to be valid and enforceable in a blow to driver efforts to secure the benefits and protections of employees in California.