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

The code generated by `gen-ext-hhvm` 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`.

It in essence converts
```c++
    (count > 3) ? &args[-3].m_data : (Value*)(&null_resource)
```
to
```c++
    (count > 3) && (args-3)->m_type != KindOfNull ? &args[-3].m_data : (Value*)(&null_resource)
```

This doesn't work with the JIT yet.  I was hoping for feedback / pointers before proceeding.  CC: @fredemmott, @swtaarrs.