Here's how a car measures its own fuel level and how many gallons are typically left when the warning light flickers on.