HHVM compatibility

Support both PHP and HHVM with a single source tree, by means of the
following changes:

* Use the HashPosition interface instead of pListHead/pListNext
* Use zend_hash_num_elements() instead of nNumOfElements.
* HHVM lacks nApplyCount, there's just no space to store that data. When
  compiling for HHVM, use an external std::set instead.
* In luasandbox_timer_enable_profiler(), use ALLOC_HASHTABLE() instead
  of emalloc().
* In luasandbox_push_zval() switch, remove IS_CONSTANT and
  IS_CONSTANT_ARRAY, since they are duplicates in HHVM and are not
  needed anyway, since the default case is there already.
* Add casts where necessary to avoid C++ warnings.
* LUASANDBOX_G(allowed_globals) cannot be persistent in HHVM, due to the
  lack of persistent hashtable support, so reinitialise it with each
  request.
* In LuaSandbox::setCPULimit(), use "z" instead of "Z" to
  zend_parse_parameter(). Not sure why "Z" was ever used -- it is very
  rare.
* Use convert_to_double_ex() instead of unimplemented
  convert_scalar_to_number_ex(). I think it is an improvement anyway.
* In LuaSandboxFunction_construct.phpt, relax error format so that it
  matches both PHP and HHVM error strings.

Change-Id: I784459fdf2e84fba81f6eff55cb183878ecec86d