Cleaned up and optimized wfBaseConvert();

* Added code to use BCMath or GMP if they are
  loaded, since they are both significantly faster.
  A parameter was added that can be used to force
  usage of a specific engine (mainly for testing).
* Made an array of base digits rather than using
  strpos() every time.
* Used casting instead of intval(), since the latter
  is six times slower.

Also added unit tests for wfBaseConvert as well as
a benchmarking class that measures the difference
between using GMP, BCMath, and pure PHP.

Change-Id: I841717be2b29a0b7fc57a13fde5cc0642cda82df
Merge "Cleaned up and optimized wfBaseConvert();"