ExerciseFailedDialog: allow to copy parts of the error message
TurtleWorld: ensure that lines are sorted in ascending order when comparing

This is an attempt to solve #298, but that's not enough: the provided
example actually don't have the right lines dupliqued, but it's near
to impossible to understand which ones there are.
TurtleWorld: Drop duplicate shapes before comparing (fix #298)