Split core functionality and Maven plugin in 2 submodules

Also make the core OSGi compatible