get_percentile(), fvrand(), disable()

* optimizations
* restore session sysvars values
* bugfix: max_sp_recursion_depth cannot be set to 999

NOTE: we can't call signal() from get_percentile() (or any other function) because it uses prepared statements