limit=0 in sqlalchemy means 0 instead of unlimited

We're using limit=0 to query unlimited records. Unfornuately,
it doesn't work when a sql based database is used as pool
management database. In sqlalchemy, it means 0. This patch
will check if the limit is 0 to decide if applying the
limit() query for sqlalchemy.

Closes-Bug: 1337191

Change-Id: Iefc07ac41b17f52f7aa6607b0eb83dbc4cdef088
Merge "limit=0 in sqlalchemy means 0 instead of unlimited"