Revert "Revert "Improve (re)spawn, add cache_block_before_spawn and max_spawn_height settings""

This reverts commit 0fd5c61c00819ae3eaf298739e8cf879e2d43820.