Added expired() and lock() flat functions for shared and weak ptrs.
New design seems to mostly work.

I still have yet to test vertices, but I'm fairly confident they'll work.
The only real outstanding issue is in a demux, if one of its sinks is
destroyed, it does not disconnect from the demux. The solution here is the
same as the old design - save the iterator and delete it - but that's some
very derived-class stuff there that isn't in anything except demux.

The connection class may be specialized based on the source.