Each XO has 1 of 2 battery chemistries, NiMH and LiFePO4.
In the case of NiMH, it's tailored specifically for GP cells. A change in internal resistance or capacity will result in a non-optimum charge. The circuitry inside the batteries has some safety built in and NiMH in general is very safe chemistry. The worst would be that you decreased the life of the cells due to overcharge. Undercharge is not a problem other than the reduced run time.
One of the nice things about LiFePO4 is that it's pretty loose on the charging specifications. If you were to find cells that fit (all of the cells in the XO are custom size) it's likely they would mostly work. You might not get the full capacity of your newer cells. Most of the problems involve charging at a C rate that's faster than the rated C for the battery.
Replacing the cells with Li-cobalt based cells (the kind in commercial laptops) would most likely either not work at all or result in disaster. Li-cobalt has a different charging voltage and is very strict in the way you charge it. The penalty for failure is quite high as you have seen with the various Li battery recalls. That's a "don't even think about it" question unless you are a both an electronics and battery expert.
If someone is both foolish and dedicated enough to assume that batteries are batteries, cuts open the case, swaps in different cells, reseals the case and uses it then I think there's very little we can do to prevent that. Except to showcase it as a "please don't do this."
Endorsement of any procedure that involves opening the battery casing is strongly discouraged. Dealing with raw battery cells requires extra care. Even cells that are not fully charged can deliver large amounts of energy if the outputs are shorted.