Fix possible issue in determine_pbkdf2_rounds

pbkdf2 is pure so an interpreter might optimize repeated calls away
entirely, we avoid this by calling it with different passwords/salts
on each iteration instead of using the same password and salt each time.
Add constant_time_equal

This should be used to prevent timing attacks that can occur when
comparing hashes lazily.