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