Implement missing stream metadata for chmod, chown and chgrp, lchown and lchgrp

Summary: PHP added stream metadata in PHP 5.4 for chmod, chown, chgrp, lchmod and lchgrp.
http://php.net/manual/en/streamwrapper.stream-metadata.php

Closes #3687. Closes #4027.
Closes https://github.com/facebook/hhvm/pull/4031

Reviewed By: @ptarjan

Differential Revision: D1629484

Signature: t1:1629484:1414509316:a2f3ceafa61520133dc25f6d58689e156d1fdad3
Fix bug in reffiness checks

Summary: If the mask was all 0s for the second set of 64 parameters, the
nParams SSATmp would be wrong in the following 64-parameter sets.

Reviewed By: @markw65

Differential Revision: D1642597

Signature: t1:1642597:1414504664:f403a7da0170c8a1b83599ef4aef39e7d34590bc