Added AggregateRule and moved aggregate validation
Rewored the Document and Aggregate* api doc.