Fix https://github.com/julianhyde/optiq/issues/214, "Modify Frameworks to allow Schema to be re-used".

Includes some cleanup by Julian Hyde.