Query: Moved Statistics class into rsaquery API.

Also added the statistics tests to AllTests.