Allow to cancel on pull permission
Change default recipients list for builds

New rules:

1. If the build happens on the default branch, all members of the
repository are notified.
2. If the build is not on the default branch, the author and the
committer who are also members of the repository are notified.
Rework email event handler specs

Stubs are re-examined and fixed.
Add enough stubs to instruments spec
Remove unnecessary stub
Tweak how we determine build status

Build's config can have key-value pair `:matrix => nil` under some
circumstances.

If this happens, `[]` will throw a NoMethodError. We need to protect
ourselves.

Ideally, we want to write

```
matrix = Hash(config.fetch(:matrix, {}))
if matrix[:fast_finish]
⋮
```

but `Kernel.Hash` is not available in 1.9.3.
Merge pull request #294 from travis-ci/ha-bug-job_wait_status

Handle the case where config has `matrix: nil`.
Merge pull request #290 from travis-ci/ps-allow-to-cancel-on-pull-permissions

Allow to cancel on pull permission
Fix issue with fast-finish build matrix not passing.

Related to travis-ci/travis-ci#1688. This change also cleans up
the tests, which had the wrong expectations before and are now
actively testing for the fast_finish feature and the correct
return values.
Merge pull request #295 from travis-ci/mm-fast-finish-with-successful-jobs

Fix issue with fast-finish build matrix not passing.
Merge pull request #291 from BanzaiMan/core_gh94_email_notification_revamp

Change default recipients list for builds
Restrict def email notification to committer and author

Regardless of the branch, email only the committer and author of the
commit.
See
https://github.com/travis-ci/travis-ci/issues/488#issuecomment-29527429
and ensuing discussion on the rationale.
Merge pull request #297 from travis-ci/ha-feature-restrict_email_recipients

Restrict def email notification to committer and author
First implementation of repository settings
Allow to actually save settings on repository object
Add find_repo_settings service
Make authorized method public on FindRepoSettings
Add better support for defaults for Repository::Settings

Defaults are set in a redis field and are overwritten by saved settings.
Add Repository::Settings#get for fetching a path
Add first option to repository settings: builds_only_with_travis_yml

Setting it to true will reject any build, which does not contain
.travis.yml file.