I would reorganise within Lightroom.
You could do it outside Lightroom, and then re-import everything in the new folder structure back into Lightroom, but you'd have to remember to get LR to write all metadata to files for every file, and you'd lose edit history, collections, virtual copies... everything except the edits themselves (but without the history - i.e. the order of edits).
If you do it in Lightroom, I don't think it matters whether you do it before or after upgrading. And you shouldn't lose anything.
Whichever way you choose, my very strong recommendation: back everything up first!