* [kotlin] Make API classes open (non-final) unless nonPublicApi is used
By making those classes open, AspectJ can be used to enhance their
behavior.
I'm not changing kotlin-multiplatform templates, where 'open' was
already present before my changes.
Closes#22271
* Fail Kotlin sample compilation if API classes stop to be public
Serves as a 'regression test'.