Fix support for multiple line moves in the line move endpoint
The move endpoint doesn't work properly in some cases where multiple lines are moved at once.
Change its behavior, so that line.to is used when only one line is moved. When multiple lines are moved, just overwrite their order and make sure the resulting order is a valid permutation over the lines. Return a 409 conflict response if the new order values do not form a valid permutation.