Javascript optimization

This PR looks massive, but its not. I re-did all the history of my changes because my [test branch](https://github.com/DeuxHuitHuit/symphony-2/tree/collapsible) commit were not meaning full.

I played a lot with the js while attempting to fix some problems with @nilshoerrmann's datetime and I kind of set a bounty to myself to solve 6d70e19 (it took me like 10 hours to figure out and the fix is 4 chars...)

I also did a lot of timelining in the dev tools and regression testing.

Hope you like it... I really put lots of effort in it.
(Native English speaker chiming in) What's the context of the naming in this case? Assuming it's attaching something to something else, then 'affix' is a good option.