Add support for mongoid max_scan option

respect the max_scan option in criteria

cache the total_count in the collection instance
prevent hitting db again in the same instance