Re-render components in mount order instead of tree depth

This should be more robust, and allows us to stop passing tree
levels along to every component.
Cleanup

Avoid compiler warnings, some commented code
Merge branch 'mountorder'
Make workaround for circular dependency less cumbersome
Reuse render function between components
Simplify mount-count
Generalize the experimental js importing