Some refactoring of BatchFetcher.
Fix problems in ExpressionTypeVisitor and make select to anonymous type with extended resource ref possible.