Match spaces to events

refraining from celebratory swearing until someone who isn't wired on adrenaline can verify that these scopes behave as intended

## NOTES

The scopes on Space are based on the following premises:
**In order for a Space to be considered a potential match for an event, it must have:**
* capacity >= event capacity
  * i.e., the space's capacity must be greater than or equal to the event's capacity
* available start date <= event start date
  * i.e., the space's range availability must begin before or on the same date as the event
* (available end date >= event end date) OR available end date IS NULL
  * i.e., the space's range availability must end after or on the same date as the event
* (available_all_hours == true) OR (available day == event day AND available start time <= event start time AND available end time >= event end time)
  * i.e., the space must either be available all hours of the day, or it must be available on the same day of the week the event is being held and available before the event begins and available until the event ends)

Except what about late night events? How do we account for events that start on Friday night and end at 2 a.m. on Saturday?

THE BEAUTY OF MATH AND BUILT-IN RUBY CLASSES, FRIENDS.

Based on a 24-hour time system, such an event would have, e.g., a start time of 2000 and an end time of 0200. So "late_night?" events have an end time that is "less than" their start time, in which case, we need to make sure that a venue both has availability on the event's start day before the start time, and that on the *next* day, the venue has an availability beginning at midnight (== 0000 == 0) and its end time is past the event's end time. (Or the venue is available_all_hours.)

If you run the seed file, and open console (from Terminal: `$ rails c`) and run the following:

```
> e = Event.last
> e.late_night?
> Space.available_for(e).count
```
there'll be only one result that matches capacity, date range, and date time requirements. You can also play with those values to test the scopes.

"But what about true multi-day-long events or [insert other edge case here]?"

That's what the humans are for. SHHHHH.

ALSO, though I hadn't really anticipated this when I initially made the argument for it, but storing a `day_id` on `AvailableTime` proved to be super beneficial for SQL lookups, as the built-in Ruby `Time` class has a `#day` method which will take any instance of `Time` (which is what `start_time` and `end_time` on `Event` are stored as) and tell you which day of the week that value falls on, but in integer form (where Sunday = 1, Monday = 2, etc.). Whee!

Okay. Going to grab something to eat and then I'll head in.