Add group_by and having query expressions

Closes #41.