Checking if unconfirmed_email has changed before to set update_needs_confirmation flash message.
Add options to expire confirmation tokens

With this patch, functionality is added to expire the confirmation
tokens that are being sent by email.
For example, if a token is valid for 3 days only, it cannot be used for
confirmation on the 4th day.
Refactored according to line notes by rodrigoflores
Fix tests for email token expiration

The tests work now, but are a bit wonky because User.create does things
I don't understand.
Trackable should use the remote IP address, not the gateway's
Merge pull request #1976 from benknowles/master

Patch for Trackable IP
Refactor according to rodrigoflores

- Favor using update_attribute instead of constructor parameters in user
  factory for tests
- Test for accurate error message when confirmation token is expired
- Don't check twice whether the confirmation period is expired
Remove unnecessary include
Refactor according to line notes from josevalim

- rename reset_password_within to confirm_within
- confirmation_period_valid? is back and memoized
- fix hash syntax to hashrocket
Merge pull request #1975 from promisedlandt/email-token-expiration

Email token expiration
Changelog
Minor correction on changelog
Do not add ActionView::Helpers::DateHelper to all models
Ensure a new token is generated if the previous one expired
Add a note about APIs in token authenticatable, closes #1959
Checking if unconfirmed_email has changed before to set update_needs_confirmation flash message.

Conflicts:

	test/integration/registerable_test.rb

Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
Revert "New password default minimum length is now 8"

This reverts commit 2950434ed344610770ad83dd77c9f45b9f01713c.
It is backwards incompatible, we need a better migration plan.
Revert "Revert "New password default minimum length is now 8""

This reverts commit b1f490a2f83630c185a664d7059bb58d23498c8f.
Actually, the implementation was good!
Update README.md include :timedout notice

Resolves #1777
Merge pull request #1993 from ahmeij/master

Add message about :timedout flash to the Readme (resolved #1777)