Optimizations (Math inlining, less superfluous other stuff)

Hello,
the attached changes are some optimizations that got the framerate in a test scenario from, as I think, 9 to 10 per second. The test scenario contains a few dozen enemies (most of them in a seperate, but visible area).
I added some code to `js_inline.py` in order to also inline some math stuff and to make calling non-inlined math functions faster.
65b7c755e0ac7c48ddd29f4ce8fc0d8f301b06a7 is mainly stuff like avoiding calling expensive stuff, simplyfinging some math, caching data, and so on.

I would also find it interesting to know whether these optimizations also make the game faster for you. Do they? If so, how much faster?