Basic implementation of action monad and asynchronous execution engine:

- Query, insert, update, delete and schema actions implemented in
  JdbcProfile.

- Query, insert and schema actions implemented in MemoryProfile.

- Query actions implemented in DistributedDriver. This is not an
  optimized implementation based on non-blocking primitives. We simply
  wrap the existing blocking calls and run them inside of
  Future(blocking(...)) in the global ExecutionContext.
  (DistributedDriver in general is not optimized, and is considered
  experimental at this point.)

- As an alternative to TestkitTest, the new AsyncTest class supports
  test methods that return Futures or Actions, and provides the
  necessary infrastructure for such tests. Testkit enforces that test
  methods in TestkitTest subclasses return Unit and that test methods
  in AsyncTest subclasses return Action or Future.

- Further simplifications for Testkit tests:
  - A string interpolator for generating unique names
  - A custom matcher instead of Assert.assertEquals

- Rename `.ddl` extension method for `TableQuery` to `.schema`

- The new API moves some operations to different profile levels:
  RelationalProfile is required for schema-related features and inserts,
  JdbcProfile is required for transactions, updates and deletes.
  BasicProfile only supports querying.

- DistributedProfile only extends BasicProfile, not RelationalProfile.
  The extra operations of RelationalProfile have never been supported
  anyway.

- Upgrade to Xerial-SQLite 3.8.7 to get in-memory databases with shared
  cache across multiple threads. This is needed for some new test cases.
  Disabling the test for multi-column primary keys on SQLite for now in
  ModelBuilderTest. This feature is broken in 3.8.7.

Still missing in this version:

- Pinned sessions

- Wrapping actions for transactions and error handling

- Streaming results

- Get statements from all insert actions
Implement session pinning for database Actions:

- New combinators: zip, andFinally, withFilter, withPinnedSession

- Move SimpleDatabaseAction out of DatabaseComponent as
  SynchronousDatabaseAction

- Logging for executed database actions, including sequence counters
  and tree dumps of fused actions

Tests in ActionTest.testSessionPinning.
Add basic transaction support for database actions.

- The `transactionally` combinator in JdbcProfile corresponds to
  `withTransaction` in the old API: It ensures that an Action is run
  inside a transaction but does not guarantee failures coming out of it
  to be atomic. In case of nested `transactionally` actions, only the
  outermost one controls a real database transactions.

- New Action combinators `filter`, `failed` and `asTry` work similarly
  to their Future counterparts.

- `transactionally`, `failed` and `asTry` can be fused into
  SynchronousDatabaseActions.

- Renamed Action.const to Action.successful and added Action.failed,
  similar to the API for the Future values produced by running these
  Actions.

- Fixed return types for JDBC insert Actions.

Test in TransactionTest (OldTransactionTest now contains the tests for
the old API which were previously located in TransactionTest).
Convert several test cases to the new API.

- Add some new assertion checking methods to AsyncTest

- Add new Action combinators: named, sequence, seq
Implement streaming via Reactive Streams API:

- Add a streaming type parameter to Action which is either NoStream
  or Streaming[+T] with an element type T.

- Return the proper streaming types for collection-valued queries.

- Remove `synchronized` blocks for synchronous action contexts.
  Enforcing a happens-before relationship through volatile reads and
  writes should be enough.

- Add dependencies for Reactive Streams to the build.

- Add TestNG and related dependencies required for running the Reactive
  Streams TCK to the build.

Tests in ActionTest.testStreaming and reactive-streams-tests.
Optimize the streaming engine and fix some bugs:

- There was a race condition when starting a stream with demand = 0.
  This is fixed by using demand values from Long.MinValue to -1 for
  demand during the initial creation of the stream.

- Demand overflow is not signaled asynchronously to prevent calling
  onError while onNext is still running.

- Remove some unnecessary atomic and volatile variables and replace them
  by regular vars.

- Remove the nested loop in the streaming engine. Without heavy
  synchronization actions, there is no need to optimize at this point
  to avoid the synchronization.
Convert more test cases and add missing features:

- Convert JdbcMapperTest, JdbcTypeTest, MainTest and MutateTest to the
  new API.

- Add a new `cleanup` combinator for Actions, which generalizes
  `andFinally`. This allows more flexible cleanup actions (as required
  by `transactionally`) without using `asTry` (which cannot be used for
  streaming results).

- Add `updateStatement` method to get an update statement without
  having to supply a parameter.

- Add separate `StreamingDriverAction` type for streaming query results.
  This type provides methods `head` and `headOption` to efficiently
  get the first result of a streaming Action without streaming.

- Throw UnsupportedOperationException instead of NotImplementedError
  (via `???`) in some places because NotImplementedError is specifically
  excluded from `NonFatal`, causing Future- and Action-based code not to
  fail cleanly if you hit it.

- Make ignored follow-on errors more explicit.

- Add support for non-buffered streaming in JdbcBackend, which allows
  asynchronous processing of LOB values. Test in JdbcTypeTest.testBlob.

- Add support for mutable result sets to the new API. Test in
  MutateTest.

- Fix a bug in `transactionally`: Do not commit or rollback in nested
  `transactionally` Actions.
Update to Reactive Streams 1.0.0.M3 and fix remaining PR review issues:

- Signal request(< 0) error asynchronously via onError.

- Signal overflow for pending elements, not total requested elements.

- Require an explicit ExecutionContext for HeapBackend.Database and
  DistributedBackend.Database. The old factory methods are hardcoded
  to use ExecutionContext.global and deprecated.

- Use a dummy ExecutionContext in HeapBackend.createEmptyDatabase.

- Properly deprecate `.ddl` and avoid deprecated methods in tests and
  doc code snippets.

- Better documentation for some DatabaseComponent variables.
Documentation plus minor improvements and fixes:

- “Introduction” and “Getting Started” adapted to the new API

- New section in the upgrade guide for 2.1 -> 2.2

- Replaced old “Connections / Transactions” chapter with new chapter
  “Databases & Actions”

- Preliminary Plain SQL support for the new API. The SQL interpolators
  for this are made available when importing `api` from a driver

- New Action combinator `Action.fold`

- Optionally create an extra keep-alive connection when using
  a DriverJdbcDataSource, for use in test environments with in-memory
  databases

- Bug fix: Don’t pass null to HikariConfig.setDriverClassName

- Bug fix: Make SuccessAction and FailureAction 
  SynchronousDatabaseActions so that Actions.seq can be fused.

- Add `DatabasePublisher.foreach`

- Add “insert...returning...into” back into the new API

- Remove Effect.BackendType which causes unnecessarily verbose code for
  little benefit (it can only protect against using the wrong type of
  backend, not the much more common case of using a wrong backend of the
  same type)

- Add `Unsafe` methods for efficient synchronous execution

- Add `SimpleAction` for easy JDBC interop
Add concurrency stress test for streaming API:

https://travis-ci.org/slick/slick/builds/44488287 shows a test failure
of createPublisher1MustProduceAStreamOfExactly1Element for JdbcBackend:

Publisher (...) produced no elements expected [true] but found [false]

In response to this failure I added a concurrency stress test in the
hope of being able to reproduce it. `StreamsStressTest` runs the same
scenario as the failed test, except many times over and in parallel. On
my MBP I ran into issues with H2 on JDK 8 with as little as 2 threads
and a few hundred iterations on each, which looks like a bug in either
H2 or the version of JDK 8 I have installed. Local tests with up to 16
threads and 10000 iterations on each thread ran successfully against
H2 on JDK 6 and 7, and against Derby on JDK 6, 7 and 8.
Merge pull request #1021 from slick/tmp/action-monad

Reactive Slick