RealmOptions, RealmCreationOptions, RealmBehaviors could all go in their own header pretty easily, out of jsapi.h. Also the accessor functions to access them on an existing realm.
By then the only thing in jsapi.h that needs any of these things is JS_NewGlobalObject which needs JS::RealmOptions (well, technically it only needs a forward declaration, but the class is JS_PUBLIC_API so using a forward declaration is fraught and not worth the trouble). Perhaps we could move all realm stuff to js/public/Realm.h which does actually exist now, but then JS_NewGlobalObject would be a somewhat weird name to appear there, maybe, and I'm unwilling to say we should rename that now (or to what).
So for now, just slim jsapi.h some, split out a coherent set of concepts to another header for improved readability, but don't actually improve the header dependency story right now.