fixing integer out of range exception in search

The change [1] introduced to return all rows when max=-1 generates an
integer overflow in the calculation of the indexes used for paging. For
example, in an environment with one data center running a query with
"page 2" generates the following error:

<fault><reason>Operation Failed</reason><detail>statementcallback; sql
[select * from (select * from storage pool where ( id in (select storage
pool with storage domain.id from  storage pool with storage domain  ))
order by name asc ) as t1 offset (-2147483648 -1) limit 2147483647];
error: integer out of range; nested exception is
org.postgresql.util.psqlexception: error: integer out of
range</detail></fault>

The problem is in SyntaxChecker.java, in line 954, where we do the
following:

result = StringFormat.format(pagingSyntax, (page - 1) *
syntax.getMaxCount() + 1, syntax.getMaxCount());

This multiplication results in Integer.MAX_VALUE + 1, which overflows
the integer and results in the value -2147483648.

This affect all uses of queries with paging.

[1] http://gerrit.ovirt.org/21375

Change-Id: I518dfdfff93dde28d9741d5e333c695239b7e7d2
Signed-off-by: Eli Mesika <emesika@redhat.com>