Restrict min/max to comparable values

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Add DISTINCT aggregate helpers

E.g.,

    users.count(distinct: age)
    // SELECT count(DISTINCT age) FROM users

Signed-off-by: Stephen Celis <stephen@stephencelis.com>