Support aggregate pipeline shortcut.

This pull request adds support for specifying an aggregation pipeline without first wrapping it in an array.