title: Rails 4 AR .select includes pk field in result even if result is grouped (as opposed to Rails 3.2)
body: <p>I'm migrating my app from Rails 3.2 to 4.0, and I'm finding a number of broken tests because Rails 4 includes the PK field (usually 'id') in the result set when using something like:</p>
  <pre><code>Invoice.where(cust_id: 1234).select('sum(gross) as gross, sum(tax) as tax, sum(net) as net').to_a.first.attributes
  </code></pre>
  <p>This used to return <code>{'gross' =&gt; 1000.00, 'tax' =&gt; 0.00, 'net' =&gt; 1000.00}</code> in 3.2, but in 4.0 it returns <code>{'gross' =&gt; 1000.00, 'tax' =&gt; 0.00, 'net' =&gt; 1000.00, id =&gt; nil}</code></p>
  <p>This is a problem if you're writing tests and comparing actual results to expected results, in which case the id field throws off comparisons. I don't see this change in behavior documented anywhere. Is there a way to turn this &quot;feature&quot; off?</p>