Prevent bytecode generation related test failures in tests that rely on PowerMock by updating to PowerMock 2.
Replaces the old Gradle plugin with plain Gradle buildscripts. Also cleans-up the current Gradle extensions and re-adds detekt, along with JUnit 5 support to all modules.