Fix T41639, hierarchical pie menu - popup interaction is buggy.

Basically, this commit changes pie menu click interaction so that
confirmation is done on left click release instead of press. This allows
dragging on the pie menu to select different items, but most
importantly, there should be no left over click events passed on to
subsequent menus/pies. This means that pie menus should now be able to
spawn popups safely. Also, left clicking to spawn a second pie menu now
sets that menu to click style by default allowing for better interaction
between hierarhies of pie menus.
Enable atomic peak memory detection

This gives more precise information about memory usage which might be real handy
when doing memory optimization.

It works good here for as long as i can tell but if for some reason you'll be
experiencing some weird slowdown please let me know.
Code cleanup: Use generic isnan() function instead of own ifdef
Current tile highlight should use render data from the engine

Otherwise tweaking resolution/border would affect the way tiles are highlighted.
Code cleanup: Mostly whitespace
Cleanup: use bool and const args
Tracking: Switch prefetch to use generic task scheduler

Not as if it gives any huge benefit to end artists, but it's kinda silly
to have like 3 different task/thread scheduling systems. The new one is
what's recommended for use now i'd say.

On the other hand it has unmeasurable memory save benefit :)
Cleanup: (float)floor -> floorf
Tracking: Use task scheduler instead of thread pool for proxy build
BLI_buffer: empty macro
very stupid cut tool
test
test2
Split out functons