added ability to use sort order in CSV

This adds the ability to use the sort order in the CSV output. Resolves issue https://github.com/activeadmin/activeadmin/issues/3269
I tried separating it out. But all I could think was to assign `view_context.send(:collection)` to an instance variable. And then move the `total_pages` implementation to a separate method. Can you please suggest something?