Fixed Bug #66731 file: infinite recursion

Upstream commit (available in file-5.17)

https://github.com/glensc/file/commit/3c081560c23f20b2985c285338b52c7aae9fdb0f
https://github.com/glensc/file/commit/cc9e74dfeca5265ad725acc926ef0b8d2a18ee70
NEWS
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  NEWS
  Fixed Bug #66731 file: infinite recursion
NEWS
Set fileinfo version to 1.0.5 (as in php 5.4, no diff)
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Set fileinfo version to 1.0.5 (as in php 5.4, no diff)
  NEWS
  NEWS
  Fixed Bug #66731 file: infinite recursion