Clean up network connections from the test coordinator and player. See #2862
Making test more DRY. See #2862
Merge pull request #1038 from akka/wip-2862-leaking-netty-threads-2.1-ban

2.1 Cherry Pick 2862 Leaking Netty threads causes file handle exhaustion
 #2775 - Adding migration guide for waiting on promises
Merge pull request #1042 from akka/wip-2775-doc-await-promise-√

Wip 2775 doc await promise √
Send secure cookie handshake over passive connections as well. See #2921
Merge pull request #1045 from akka/wip-2921-secure-cookie-and-passive-connections-ban

Send secure cookie handshake over passive connections as well. See #2921
relax too tight timing in FSMTransitionSpec
don’t use the testActor.queue for probe.watch(), see #2915
document deadlock risk of TestProbe.watch(TestActorRef), see #2916
log failures in postStop, see #2928
Merge pull request #1056 from akka/wip-2.1-misc-backports-∂π

Wip 2.1 misc backports ∂π
Allow negative Load average in test, see #2664

* According to documentation it can be negative for some OS
(cherry picked from commit edc9fd733d7d57e95654c4fc1fefdb9d7eb52d74)
Use undefined metrics value for negative load average, see #2664
(cherry picked from commit 99cf420a376597b7340a37180d0ea89a6b3004fb)
Initial work of adaptive metrics aware routers, see #2547
(cherry picked from commit f306964fca35d7eab95727a8a7b213e3d30ce81e)

Conflicts:

	akka-cluster/src/main/scala/akka/cluster/ClusterMetricsCollector.scala
ClusterLoadBalancingRouter and refactoring of metrics, see #2547

* MetricsSelector, calculate capacity, weights and allocate weighted
  routee refs
* ClusterLoadBalancingRouterSpec
* Optional heap max
* Constants for the metric fields
* Refactoring of Metric and decay
* Rewrite of DataStreamSpec
* Correction of EWMA and removal of BigInt, BigDecimal
* Separation of MetricsCollector into trait and two classes,
  SigarMetricsCollector and JmxMetricsCollector
* This will reduce cost when sigar is not installed, such as
  avoiding throwing and catching exc for every call
* Improved error handling for loading sigar
* Made MetricsCollector implementation configurable
* Tested with sigar
(cherry picked from commit c9d206764a183fe3e1799c1359c2c56978026181)

Conflicts:

	akka-cluster/src/main/scala/akka/cluster/ClusterMetricsCollector.scala
AdaptiveLoadBalancingRouter and more refactoring of metrics, see #2547

* Refactoring of standard metrics extractors and data structures
* Removed optional value in Metric, simplified a lot
* Configuration of EWMA by using half-life duration
* Renamed DataStream to EWMA
* Incorporate review feedback
* Use binarySearch for selecting weighted routees
* More metrics selectors for the router
* Removed network metrics, since not supported on linux
* Configuration of router
* Rename to AdaptiveLoadBalancingRouter
* Remove total cores metrics, since it's the same as jmx getAvailableProcessors,
  tested on intel 24 core server and amd 48 core server, and MBP
* API cleanup
* Java API additions
* Documentation of metrics and AdaptiveLoadBalancingRouter
* New cluster sample to illustrate metrics in the documentation,
  and play around with (factorial)
(cherry picked from commit dcde7d35944dc527847314ebe6fc0ecd295390d7)

Conflicts:

	akka-cluster/src/main/scala/akka/cluster/ClusterEvent.scala
Incorparate review feedback, see #2547

* case object and case class for MixMetricsSelector
* Rename decay-half-life-duration to moving-average-half-life
* Clarification of decay-half-life-duration and collect-interval
* Removed Fields, Java compatibility issue
* Adapt for-yield variables
* Comment metrics collector constructor that takes system param
* Don't copy EWMA if not needed
* LogOf2 constant 0.69315
* Don't use mapValues
* Remove RichInt conversion
* sigar version replace tag in docs
* createDeployer factory method to make it possible to override
  deployer in subclass
* Improve readability of MetricsListener (in sample)
* Better startup of factorial sample (no sleep)
* Many minor enhancements and cleanups
(cherry picked from commit 5eec693fd08e50e60b5446924a571078305d1ca5)

Conflicts:

	akka-actor/src/main/scala/akka/serialization/Serialization.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterMetricsCollector.scala
	akka-cluster/src/main/scala/akka/cluster/routing/AdaptiveLoadBalancingRouter.scala
	akka-cluster/src/test/scala/akka/cluster/MetricsCollectorSpec.scala
Incorparate more review feedback, see #2547

* negative double check
* correction of cluster specification
* add isEmpty in WeightedRoutees
(cherry picked from commit 5d874fec176dce452ab8403c721d4a8eed5e0ad3)

Conflicts:

	akka-cluster/src/test/scala/akka/cluster/MetricNumericConverterSpec.scala
Fix failing WeightedRouteesSpec, see #2547
(cherry picked from commit 39d81b37dfc11a70767e244decc7d0282bd359d5)

Conflicts:

	akka-cluster/src/test/scala/akka/cluster/routing/WeightedRouteesSpec.scala