refactor(engine/container): extract JMX core

This is the resulting refactoring from the platform-api-hack in May with Daniel and Roman.