Extract JSON to a separate dependency, rename 'runtime' to 'core' (#1062)


* Introduce JsonInternalDependencies
* Make SealedClassSerializer public
* Duplicate test code in a few places

Fixes #994
diff --git a/settings.gradle b/settings.gradle
index 29e9469..88bcb94 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -6,7 +6,10 @@
 enableFeaturePreview('GRADLE_METADATA')
 
 include ':kotlinx-serialization-core'
-project(':kotlinx-serialization-core').projectDir = file('./runtime')
+project(':kotlinx-serialization-core').projectDir = file('./core')
+
+include ':kotlinx-serialization-json'
+project(':kotlinx-serialization-json').projectDir = file('./formats/json')
 
 include ':kotlinx-serialization-protobuf'
 project(':kotlinx-serialization-protobuf').projectDir = file('./formats/protobuf')