Cached custom functions

Cached the boosted functions so even BoostArray construction is boosted, and hopefully even tiny further improvements in the functions themselves. Not sure why running index.js threw errors all over the place on powerarray so my changes are (a bit) theoretical...