sorting for gridfs chunks

We have to provide an $orderby for the gridfs chunk query, we've been
getting lucky thus far
move a typedef after the enum it wraps

pedantic