Sort x-values in geom_line

It turns out that geom_line also expects x-values to be sorted. This
commit moves the function ```_sort_list_types_by_x``` to geom.py and
renames it to ```sort_by_x``` and adds a call to it in ```geom_line```