Added support for $first and $last aggregation operators.