Fix return types of password API helper functions.

This fixes issues that were found during static analysis by cjones where failure was impossible to detect due to return type mangling (casting an int to a char, then comparing to an int).
Merge branch 'PHP-5.5'

* PHP-5.5:
  Fix return types of password API helper functions.