Implemented UserFile file descriptor casting.

Summary: Implemented UserFile file descriptor casting by calling user defined function streamWrapper::stream_cast(int). Also in the function which converts File* to file descriptor, checks whether the casting function fd() returns -1, raise warning if so. Finally after all the castings for read / write / except array are done, check whether any file descriptors are successfully casted, if not, raise warning and return false.

Passing vfsstream selectStream test.
Closes https://github.com/facebook/hhvm/pull/4320

Reviewed By: @JoelMarcey

Differential Revision: D1700515

Signature: t1:1700515:1417906904:ef75237addf5559d512ae99d959a2a7df9a3b304
Fix #4361, Raising security notice when salt value is not provided for crypt() function

Summary: Raising notice when crypt salt parameter is empty also, changing ext_string.php.expectf test appropriately, so it accepts raising an error.
Closes https://github.com/facebook/hhvm/pull/4375

Reviewed By: @fredemmott

Differential Revision: D1715825

Signature: t1:1715825:1417907476:b1594a972e6ca8d8c416ac7920fc7d652ef326bb