physics-bh: optimized octree cleanup algorithm

Memory usage rises by a just a bit but it's much faster. Also decided to not use a global variable to keep track of octrees. I'll use the thread specific ones by passing them along. Also, had access to a machine running Ubuntu 14.04 today. It didn't even have stdatomic.h, nor gcc-4.9. I could compile it with clang but it couldn't use vectors. And gcc couldn't link. And yet everything runs fine and awesome here on Debian SID.