Security Manager's work

If the security manager is set, resolve the class inside a priviledged
access block

JIRA: https://issues.jboss.org/browse/HORNETQ-1357

redoing https://github.com/hornetq/hornetq/pull/1671