Convert system/idl/function to HNI

Summary: Convert system/idl/function to HNI.
Also fixes compatibility with PHP, when func_get_arg() is called with non-integer parameter.

Part of https://github.com/facebook/hhvm/issues/1480.
Closes https://github.com/facebook/hhvm/pull/3942

Reviewed By: @​svcscm

Differential Revision: D1608060

Pulled By: @ptarjan