[IR] Cover additional cases in unboxing analysis

* The code is safer in more scenarios now and also a bit more robust.
* Still missing inline/type guards.