RSVP from event detail page

This PR activates the RSVP button on the event detail page.

I extracted the RSVP markup into a partial so it can be rendered and returned as the response from the register and unregister views.

The workflow for making an AJAX request and replacing content with the response was not specific to event registration, so I implemented a reusable fetchAndReplace function.

There are several different behaviors triggered by different states of the database and logged in user, so I will add some integration tests before merging.
Should we redirect after a successful POST to avoid form re-submission if the user refreshes?