Optimizations and revised dependencies

Various optimizations in tablehelper:
* Replaced `t:append` calls with `t[key] = ` where `key` is increased
during the loop.
* Replaced T-tables with regular tables where possible, for slightly
lower overhead.
* Localized `#t` where possible, so it doesn't have to be recomputed.
* Various adjustments to algorithms for `reverse`, `slice`, `splice` and
others.

Metatable-preservation added to tablehelper functions that return a new
table (`copy`, `sort`, `slice`, etc.).

Refactored some of the tables in xml.lua and json.lua out to the
module-global space, for efficiency.

Introduced the `_raw` global table, for standard Lua functions that have
been adjusted.

Removed stringhelper's dependencies on tablehelper and mathhelper.

Removed all of mathhelper's dependencies.

Fixed a bug in `math.sgn` for 0 values.

Fixed earlier introduced bug in logger.