[SPARK-2135][SQL] Use planner for in-memory scans

Correct.

That sounds like a nice optimization for a future PR :)  Really at that point we might special case COUNT such that we just get that statistic instead of calling next() `n` times.