Sort functionality

closes #276 
since this is potentially reusable, and long, it could go in a helper namespace, maybe `ona.viewer.helpers.collections`?