Create CSVWriter helper class and write frequency analysis data to csv.

Use a Writer instead of an output stream.
Fix selection group.

Avoid side affects when calling setSelectedForDrag.
MotionAnalysis: also use the CSVWriter.
Fix java doc links.
Only setProgress if the event comes from the user.