Code redeem checks registration status

Codes can only be redeemed for registrations in pending-payment status.
Light methods for seat checking

One to quickly check how many seats are left for grabbing, one a helper to
see whether any seats are left at all.
Method to update remaining registrations

We'll switch all remaininig pending-payment registrations to waiting-list,
once the seating limit is exhausted. Putting the read and update into a
transaction with FOR UPDATE on the SELECT will make sure that someone who
may be concurrently registering will not be able to override the limit.
Returning negative seats remaining

This will allow us to see if we're already over limit or not yet. Required
because once we pass the limit, we'll still be able to switch some
registrations manually to be able to pay, going beyond the initial limit
and if we're not checking for that, we'd always be updating these manually
enabled registrations back to waiting-list.
Updating remaining registrations to waiting-list
Code comment
Switch method to check seat limit

Uses the new, lighter method to see if there are any seats left, when
deciding whether to put a person on the waiting list.
Merge branch 'seat-exhaustion-update'