Handle invalid keys in Lua-to-PHP calls for LuaSandbox

PHP can't handle having arrays/objects or functions as keys in its
arrays, so make sure we don't try to pass them from Lua. Booleans aren't
really well-handled either, so let's disallow them too.

Also, fix stringification of infinities as "inf" rather than as the
number 0.

Also, add tests for proper stringification of floats and infinities when
those are used as keys.

Bug: 54527
Change-Id: I566c943b5c00194f6a00cb97eb1f39c99176e4b4