Fix stream_select() issue with OpenSSL buffer

Ensure data from OpenSSL internal buffer has been
transfered to PHP stream buffer before a select()
emulation operation is performed

Addresses bug #65137
https://bugs.php.net/bug.php?id=65137

Conflicts:
	ext/openssl/xp_ssl.c
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Fix stream_select() issue with OpenSSL buffer

Conflicts:
	ext/openssl/xp_ssl.c
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fix stream_select() issue with OpenSSL buffer