Merge pull request #1757 from clebertsuconic/upmaster

https://bugzilla.redhat.com/show_bug.cgi?id=1013777 - Large Message Sync could be left unattended after failure
[HORNETQ-1381] creates HornetQ threads in a privileged block

JIRA: https://issues.jboss.org/browse/HORNETQ-1381
Merge pull request #1754 from jmesnil/HORNETQ-1381_thread_factory_security_manager

[HORNETQ-1381] creates HornetQ threads under a security manager
No need to do a memory copy when using netty >= 4.0.19.
Just slice out the frame and call retain() on it, this will eliminate the need of memory copy for each frame and so improve the overall performance.

Originally done by Norman at https://github.com/hornetq/hornetq/pull/1629