Add support for distinct database queries

refs #4180
Make page/limit params work if either of those is hardcoded