Switch to shallow copy for quad-tree structus

Tiles and middle tree-levels are reference-counted now.
Also, its modification after creating is prohibited.
Only tree root structure left intact.
Organize table of tile functions

This commit creates one static table for each combination of CPU feature set and tile size.
Also, code for different tile sizes is now merged.
Switch to loop-local counters