adding a printer for query expressions - its a debug-only feature - makes it easier to analyze the queries. CR: Diego, Arthur
Added constraints and checks to ensure CLR entity types are reference types.
Fixup - changes based on PR comments.