Faster count query generated to estimate result set size

Simple idea:
Instead of select count(*) from (select soup from xyz where abc order by) 
Does a select count(*) from xyz where abc (no inner queries, no order by).

For smartsql, the select ... from is replaced by select count(*) from (so any sorting will still happen but hopefully sqlite optimize them away).

To do:
The same change on the android side.

Added a test:
https://github.com/forcedotcom/SalesforceMobileSDK-Shared/commit/07776454cea4f3a43f69e4ee4ed386ecdf6e0979

(Should have done a pull request for the new test, but did the checkin from the submodule directly into forcedotcom)

Without the change, the test takes more than 30s, with the change, the test runs under 10s.