Large raft of persistence fixes

A bunch of stuff got broken when the AtomSpaceImpl was created.  Put everything back into working order.  I think it should all be OK now ...