Make mongo instead of ruby get all document ids

With 385 editions in the database this speeds it up from taking around
10 seconds to taking less than 0.01 seconds.