Pump: refactored code to eliminate SOURCE_ENDED state

That state was orthogonal to pump state, so it was moved to a separate
property.