Backported wicket-cdi-1.1 from Wicket 7 to 6
Workaround for WELD-1546: try to lookup beanmanager from JNDI first
Also inject anonymous classes
Fix testcases
fix all kinds of warnings