Chevron’s stock rallies after earnings and production beat expectations, and a record amount of cash was returned to shareholders.