[#1872] fix(session): restore session, flash before new request even for serveStatic call
[#1871] Refactor getJavaVersion
* chore(lib): update to groovy V 2.3.6
* fix(Exception): remove useless cast to Exception (avoit incorrect cast exception)
Merge pull request #798 from xael-fry/lighthouse-1872-patch

[#1872] fix(session): restore session, flash before new request even for...
Methods should be protected so that they can be used/overidden from outside default package
* Add specific method to allow to override the compiler options
Merge pull request #802 from xael-fry/templateCompilerProtectedMEthod

Methods should be protected so that they can be used/overidden from outs...
Remove ineffectice code for replacing class names. Our applications work well without it.
artifacts named '*.jar' should not be treated as modules.

this patch ensure local '.jar' artifacts are copied to 'lib/'
instead of extracted to 'modules/'.
named isInsideTransaction() should be used in named closeTx()
Prevent connection leaks: do not create new EntityManager if transaction is not active.

These newly-created EMs are not bound to thread and thus never closed.
This is also how play 1.2.x used to work: no transaction - cannot read from DB.
use JPA.DEFAULT constant, as a few lines above
simplify code: use ThreadLocal's initialValue() to greatly reduce number of null checks
use more efficient iterations and remove unused some code
Allow developers to enable c3p0 logging for eg connection leak debugging via Log4J configuration.
FallbackMLog logs to system error, which is not convenient.
throw JPAExceptions in case of JPA errors instead of RuntimeExceptions - suggestion by xael-fry

catch in isInsideTransaction() is not needed anymore as well, as JPAException is never thrown from the try block
Restore method isInitialized to detect if JPA is initialized
[#1880] Fix file handle leak in VirtualFile.content and VirtualFile.contentAsString
[#1880] Close resources in finally block to avoid file handle leaks in case of exceptions
[#1880] Use commons-io API to fix wrong usage of InputStream.read()
[#1880] Use commons-io API to avoid re-inventing the wheel