Support aggregate pipeline shortcut.

This pull request adds support for specifying aggregation pipelines without wrapping them in an array.