Implement missing stream metadata for chmod(), chown() and chgrp()

PHP added stream metadata in PHP 5.4 for chmod, chown and chgrp.
http://php.net/manual/en/streamwrapper.stream-metadata.php

Closes #3687. Closes #4027.