Fix bugs in the zend compat layer for initialization entries.

Summary: 1. Fix a logic inversion bug with the return value from on_modify handler;
2. on_modify handler may be null, so protect against that;
3. the `modifiable` item is a bit set which may contain more than one element.

With these fixes, dso_test.php now sees that the direction flag
is correctly bound and implemented.
Closes https://github.com/facebook/hhvm/pull/3613

Reviewed By: @sgolemon

Differential Revision: D1525229