Moved req stmts from config.ru + Invite model work

* Moved the require statements from config.ru to app.rb
* Added generate_code() class method to Invite
* Created validation for presence of code

Note that the generate_code() method generates a unique code
but we don't test against uniqueness yet.