No problem for sharing the thoughts. We love feedback of any sort around here.
The Javascript code itself is meant to load asynchronously (so it doesn't block the rest of the page from loading). Because of that, it should be at the top of the page. It does work at the bottom, and about a year ago, that's where it was.. but we moved it to the top per recommendations by Facebook and for an overall performance benefit - At the end, it loads more or less sequentially.. at the beginning and asynchronously, it loads concurrently.
As for using JS to load, that's fraught with some issues too as you generally can't reliably detect the opening body tag until the closing tag has been loaded. In most browsers, it will work, but IE7 or lower especially (and depending on what else is going on the page, IE8+) will balk if you try to find an element that isn't closed. So, if we do a DOM manipulation, we're basically back to sequential loading.. with extra JS to do it.
So, with that said, again, I don't know of any great solutions for your case. We have a lot of users, and in all honesty, this is the first case we've heard of this exact usages of the -if IEx- tags. Like mentioned before, we usually see that method to load other CSS file (which is also what the default Joomla templates do). I did a google search and did find other examples and recommendations to do what your doing, but it still doesn't seem common from what we've seen.. which makes it hard for us to cater to it (not saying it's wrong). Other things, like capitalized BODY or even wierd cased BoDy tags are things we've fixed before, as well as additional classes or weird things in the body element itself.. but just not sure how to handle multiple tags in IF/Else blocks properly.. especially without knowing which will be used.
It would be possible to add the JS to every opening body tag we see, but that's more code on the page, and possibly could affect some other sites in some unforeseen way.
Whew.. either way, we're obviously thinking about it, so don't think I'm throwing you under the bus. Again though, for the upcoming 4.0 release, I don't think we'll have a fix.. so keep this in mind when you upgrade.
Thanks again for the feedback, and any other suggestions are welcome!
Alex