Fix all crashes related to saving newly created bracket in database.

All schedule data is now saved into the database, but viewing the schedule still doesn't work. Also need to tweak the schedule creation algorithm so that it reads from the database for everything instead of using the temporary object model that it currently relies on.