Revealing the nature of small-planet atmospheres: JWST tests the water world hypothesis for GJ 9827d