Update captured Janrain attributes upon login

When users log in, their attributes from Janrain are persisted locally via the
set_capturable_params method. If one of these attributes is changed between
logins, the updated value is not persisted in the application's database upon
the next login. If the application using Devise::Capturable relies on any of
these values, it may be working with stale data as a result.

Fix by making sure set_capturable_params is called on a user that is already
persisted, before reporting a successful login within the Devise.

This behavior is not present in the current main repository for this Devise
plugin. In addition, we had to modify tests to keep existing functionality
passing. It's possible that the existing tests weren't completely exercising
the code. We intend to pursue this further and submit a pull request in the
future.
Merge remote-tracking branch 'upstream/master' into merge-in-changes-from-rune

Rune has made several updates to Devise:Capturable since the O'Reilly-specific
branch was worked on, making our version behind that being used by the Atlas
team. Bring in these changes, resolve conflicts, and make other updates as
needed.

* Specify RSpec version 2.14 or newer, so the expect().to receive syntax works
* Fix view spec to expect link construction in the proper order: href, then
	options (I checked Rails source to confirm this after the included view spec
	failed)
* Resolve conflicts

Conflicts:
	lib/devise_capturable/strategy.rb
	spec/strategy_spec.rb

Task: https://oreillymedia.atlassian.net/browse/PT-558
Make server-side redirect_uri value configurable

In order for Janrain to work, the value of redirect_uri set on the client and
server sides must match. Further, for the Federate option to work, this value
must match the protocol and domain of the application's environment. The
current implementation hardcodes this value, so it can't be customized per
application and environment.

Fix by making the value configurable per application and environment.

Task: https://oreillymedia.atlassian.net/browse/PT-560
Make Javascript overridable

The values for a few Janrain and authentication-related settings are hard-set in
the Javascript provided in the gem. These need to be customizable in order for
the following scenarios to work:

* To use the `signInEmbedded` flow instead of the default `signIn`
* To specify a `redirectUri` value (required to use Janrain's Federate feature)
* To add functionality to Janrain event handlers, or add more event handlers
* To use a different Devise resource than User

To fix, allow the Javascript to be overridden. A developer can replace the default `janrainCaptureWidgetOnLoad` function with one specific to the application. In addition, an optional path may be passed to the `afterJanrainLogin` function to specify a Devise resource to use when completing
login.
Merge pull request #11 from oreillymedia/enable-federate

Enable plugin for use with Federate