ZF-7046: Clean up DbSelect adapter code

Description

There is some code duplication going on in Paginator's DbSelect adapter. It needs to be cleaned up. Maybe add some documentation in the process.

Comments

Resolved in r16160 and merged to release-1.8 in r16161