Thumb loader refactor

This is an attempt to improve the (video) thumb-loader's performance, which currently is considerably worse than it was in Eden (11.0). Note that although this PR improves it a lot, we are not back at Eden performance yet.