[BZ-1007055] use kieproject classloader also to compile java classes
(cherry picked from commit 12724f6c5852e474f5d5329e07b4268410d643b6)