Add function bcrypt_needs_rehash
The function can be used to check whether or not a given hash is valid,
and maches a given cost.