Refactor Stage API to better protect Source/Sink objects.

Also convert Stage to use a DPointer to hide implementation.