Allow passing NULL to a native call taking a Resource with NULL default

The code generated by gen-ext-hhvm.cpp is wrong for `null_resource` defaults. In particular, when PHP code passes a PHP NULL to a C++ function argument with a `null_resource` default it will end up going though `tvCastToResourceInPlace()` which ends up converting the NULL to a DummyResource instead of `null_resource`. It does this because a `NULL` currently **cannot** be converted into a `null_resource`.

This doesn't work with the JIT yet.  I was hoping for feedback before proceeding.  CC: @fredemmott, @swtaarrs.