Fix inconsistent quotes and refactor an if statement

Fix inconsistent quotes and refactor an if statement in `lib/couchrest_model.rb`.