Introduce a companion `Incremental` class.

Move most of the functionality from `Incremental` object to its
companion class.

This commit is a preparation for making it possible to have
two different implementation of logic in `Incremental` object.
Add Logger and IncOptions as Incremental class constructor args

Both Logger and IncOptions instances were passed around Incremental class
implementation unmodified. Given the fact that entire implementation of
the class uses exactly the same values for those types it makes sense
to extract them as constructor arguments so they are accessible everywhere.

This helps reducing signatures of other methods to more essential
parameters that are more specific to given method.
Introduce abstract `IncrementalCommon` class.

Introduce an abstract `IncrementalCommon class that holds the
implementation of incremental compiler that was previously done in
`Incremental` class. Also, introduce `IncrementalDefaultImpl` that
inherits from IncrementalCommon.

This is the first step to introduce a design where most of incremental
compiler's logic lives in IncrementalCommon and we have two subclasses:

  1. Default, which holds implementation specific to the old algorithm
     known from sbt 0.13.0
  2. NameHashing, which holds implementation specific to the name
     hashing algorithm

This commit is purely a refactoring and does not change any behavior.
Introduce `IncrementalCommon.invalidateSource` method.

In addition to `invalidateSources` we introduce `invalidateSource`
that invalidates dependencies of a single source. This is needed
for the name hashing algorithm because its invalidation logic
depends on information about API changes of each source file
individually.

The refactoring is done in `IncrementalCommon` class so it affects
the default implementation as well. However, this refactoring does
not affect the result of invalidation in the default implementation.
Make `invalidateSource` to take Relations.

This way we'll be able to have a polymorphic implementation of this
method in the future. One implementation will use the old dependency
tracking mechanism and the other will use the new one (implemented
for name hashing).
The invalidateByExternal takes single external api change.

Refactor the `invalidateByExternal` method to take single, external
api change. Introduce `invalidateByAllExternal` that takes all APIChanges
object.

This way `invalidateByExternal` will have an access to APIChange object
that represents changed name hashes once name hashing is merged.
Refactor code in IncrementalCommon and IncrementalDefaultImpl

Move implementation of the following methods from IncrementalCommon
to IncrementalDefaultImpl:

  * invalidatedPackageObjects
  * sameAPI
  * invalidateByExternal
  * allDeps
  * invalidateSource

These are the methods that are expected to have different implementation
in the name hashing algorithm. Hence, we make them abstract in
IncrementalCommon so they can be implemented differently in subclasses.
Fix a few mistakes related to IncOptions.recompileOnMacroDef

The 39036e7c2097c5597df5e66a9d4923dd5154a510 introduced
`recompileOnMacroDef` option to IncOptions. However, not all necessary
logic has been changed. This commit fixes that:

  * `copy` method does not forget the value of the `recompileOnMacroDef`
    flag
  * `productArity` has been increased to match the arity of the class
  * `productElement` returns the value of `recompileOnMacroDef` flag
  * `hashCode` and `equals` methods take into account value of
    `recompileOnMacroDef` flag
  * fix the name of the key for `recompileOnMacroDef` flag
Add `nameHashing` option to IncOptions

This option is not used anywhere yet. This commit just contains all
the boilerplate needed in order to introduce a new field to IncOptions
class.
Use `nameHashing` option throughout incremental compiler

There are two categories of places in the code that need to refer to
`nameHashing` option:

  * places where Analysis object is created so it gets proper
    implementation of underlying Relations object
  * places with logic that is specifically designed to be enabled by
    that option

This commit covers both cases.
Test for inheritance and member references.

Add a test-case that documents current behavior of incremental
compiler when it comes to invalidating dependencies that arise
from inheritance and member references.
Fix a typo
Merge pull request #1056 from dimbleby/typo

Fix a typo
Small changes
Unify warning to other schemes and use string interpolation
Fix saving session settings
Merge pull request #1058 from jaceklaskowski/doc-small-changes

Small changes
fix CommandStrings.settingsDetailed
Javadoc changes
Use string interpolation and replace deprecated methods