Fixed Bug #66412 readline_clear_history() with libedit causes segfault after #65714

Checking all libedit functions, this check is done in each functions (add_history,
read_history, write_history, ...) but is missing in clear_history.

Test coverage: readline_clear_history_001.phpt
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fixed Bug #66412 readline_clear_history() with libedit causes segfault after #65714