Added 'chunk' method.

Added 'chunk' method to query builder and Eloquent for doing work on
large result sets.
merge 4.0.
work on merging 4.0 branch.