[#1846] Attempt to make message parsing faster
Test message parsing
Get rid of asInstanceOf in play-functional
Refactoring Cached
Created parameter validator to allow easy validation of multiple parameters against multiple constraints. Included unit tests

Added another unit test to prove we support different data types and aggregate multiple errors
Newlines at the end of the file.
Make the JavaScript reverse router return a play.api.templates.JavaScript value
Update JavaGuide2.md

add addtional lines to modelsTest.java to prevent compilation error.

import java.util.List;
import com.avaje.ebean.*;
import play.libs.*;
Fixed regression in rendering repeated Java form fields

Fixes #2499

The actual bug was that the the Java Field.indexes implementation was
not returning distinct indexes when the form had no value associated
with it (eg, if it failed validation), so if a field that was repeated
had multiple sub fields, the repeat hepler would render it once for
every sub field.

Additionally, in that case, the ordering of the indexes was made
random by virtue of being calculated fdrom the keys of a HashMap, where
but the indexes should be returned in order.

This only just exposed itself because the old repeat helper simply
rendered as many fields as the maximum index.  The new one however
renders fields equivalent to what indexes exist in the form.

New tests test both that only one of each index appears, and that
indexes are always returned in order.
fix OWrites implicitNotFound message
WebSockets refactoring

There are two main new features here, one is, in built support for
handling WebSockets using actors (this code came from reactive maps and
has been thoroughly reviewed by the Akka team).  The other is the
ability to reject a WebSocket by sending a Result.

In addition to this, since when working with actors, it might make sense
to use higher level message types (when using iteratees/enumerators you
can easily use enumeratees to address this), and the type of the
messages coming in might be different to the type of the messages going
out, this makes it possible to use different message types of incoming
messages and outgoing messages.

This however is not implemented on the Java side, since the Java side
does not provide any existing mechanism to format incoming messages, you
can only handle them as strings, bytes or JSON.  Adding this to the Java
API would be a considerably large amount of work that I didn't want to
take on just yet.

Of course, I also added tests, and this meant writing a WebSocket client
(uses Netty).

In the process of writing tests, I found and fixed several bugs in
Play's WebSocket support, including 2 race conditions and 2 spec non
conformance bugs.  In the process of fixing these I did some substantial
refactorings to the WebSockets implementation in general.

I've added fairly comprehensive docs of the new features, and also
extracted code samples that weren't previously extracted in the Scala
WebSockets docs.

Summary of changes:

* WebSockets can now have both an input and output frame formatter (just
  scala)
* WebSocket actor support (java and scala)
* WebSocket handlers can reject a WebSocket with a Result (java and
  scala)
* Fixed race condition in Netty WebSocketHandler code that could cause
  incoming messages to be missed when the WebSocket is first created
* Fixed race condition in JavaWebSocket code that could cause incoming
  messages to be missed when the WebSocket is first created
* Fixed bug where close frame was not being sent when the consuming
  iteratee was done.
* Fixed bug where close frame was not being sent when the EOF was sent
  from the enumerator.
* Renamed NettyPromise to NettyFuture and made it an implicit conversion
  that provides a toScala method that converts ChannelFuture to
  scala.concurrent.Future[Channel]
* Added fairly comprehensive tests for WebSockets, handled with
  iteratees/actors/java actions
* Added documentation for all new functionality
* Extracted Scala code snippets
Allow evolutions to be run in a single transaction

* Set evolutions.autocommit=false to turn autocommit off
Documentation for evolutions.autocommit
Add SBT cookbook in the documentation
Collect parser
Fix: typo in JavaGuide (todo list)
Merge pull request #2573 from jroper/websockets

WebSockets refactoring
Merge pull request #2608 from DanieleSalatti/master

Fix: typo in JavaGuide (todo list)
Added activator template test/publish
Merge pull request #2606 from cchantep/anorm-collect

Collect parser