Fix query counters when testing with IdentityMap on 3.2

### Problem
When counting the number of queries(e.g. IdentityMap), we cannot touch `firm` when saving a `Client`

### Solution
Add a instance var, which if set to true would touch the parent.

review @rafaelfranca
If you wanna to cherry-pick this to master is ok too.