Repository: mockk/mockk
Issue: Bug: mocking constructor called by object gives inconsistent results

### Description

I'm trying to mock a class which appears as a private property in an object, and which is constructed when the object initializes. The situation is illustrated more or less minimally by the following code excerpt:

```
object ExampleObject {

    private val exampleClass = ExampleClass()
    fun getExampleProperty(): Int = exampleClass.exampleProperty
}

class ExampleClass {

    val exampleProperty: Int = 1
}

@RunWith(JUnit4::class)
class MockkExampleTest {

    @Before fun setup() {
        mockkConstructor(ExampleClass::class)
        every {anyConstructed<ExampleClass>().exampleProperty} returns 0
    }

    @Test fun test1() {
        assertEquals(0, ExampleObject.getExampleProperty())
    }

    @Test fun test2() {
        assertEquals(0, ExampleObject.getExampleProperty())
    }
}
```

### Expected Behavior

`test1()` and `test2()` should both pass or both fail when run in sequence, since they are identical and don't have any obvious side effects.

### Current Behavior

When the two tests are run in sequence, the first to run passes and the second fails.

#### Steps to Reproduce

You can find this code in the form of an Android Studio project at `https://github.com/sglasman/MockkExample`. Running the tests together in Android Studio will reproduce the problem.


Changed files:
dsl/common/src/main/kotlin/io/mockk/API.kt, mockk/common/src/test/kotlin/io/mockk/it/ConstructorMockTest.kt

diff --git a/dsl/common/src/main/kotlin/io/mockk/API.kt b/dsl/common/src/main/kotlin/io/mockk/API.kt
index 35add1d5..f229e7ca 100644
--- a/dsl/common/src/main/kotlin/io/mockk/API.kt
+++ b/dsl/common/src/main/kotlin/io/mockk/API.kt
@@ -508,7 +508,7 @@ object MockKDsl {
 
             MockKCancellationRegistry
                 .subRegistry(MockKCancellationRegistry.Type.CONSTRUCTOR)
-                .cancelPut(it, cancellation)
+                .putIfNotThere(it, cancellation)
         }
     }
 
@@ -517,6 +517,16 @@ object MockKDsl {
      */
     inline fun internalUnmockkConstructor(vararg classes: KClass<*>) {
         classes.forEach {
+            MockKGateway.implementation().constructorMockFactory.clear(
+                    it,
+                    MockKGateway.ClearOptions(
+                            answers = true,
+                            recordedCalls = true,
+                            childMocks = true,
+                            verificationMarks = true,
+                            exclusionRules = true
+                    )
+            )
             MockKCancellationRegistry
                 .subRegistry(MockKCancellationRegistry.Type.CONSTRUCTOR)
                 .cancel(it)
@@ -2254,6 +2264,13 @@ object MockKCancellationRegistry {
             map[key] = newCancellation
         }
 
+        fun putIfNotThere(key: Any, newCancellation: MockKCancellation) {
+            val map = mapTl.value
+            if (!map.containsKey(key)) {
+                map[key] = newCancellation
+            }
+        }
+
         fun cancelAll() {
             val map = mapTl.value
             map.values.forEach { it() }
diff --git a/mockk/common/src/test/kotlin/io/mockk/it/ConstructorMockTest.kt b/mockk/common/src/test/kotlin/io/mockk/it/ConstructorMockTest.kt
index e632541a..c6b6b2c9 100644
--- a/mockk/common/src/test/kotlin/io/mockk/it/ConstructorMockTest.kt
+++ b/mockk/common/src/test/kotlin/io/mockk/it/ConstructorMockTest.kt
@@ -5,6 +5,15 @@ import kotlin.test.Test
 import kotlin.test.assertEquals
 
 class ConstructorMockTest {
+    class ExampleClass {
+        val exampleProperty: Int = 1
+    }
+
+    object ExampleObject {
+        private val exampleClass = ExampleClass()
+        fun getExampleProperty(): Int = exampleClass.exampleProperty
+    }
+
     class MockCls(val x: Int = 0) {
         fun op(a: Int, b: Int) = a + b + x
 
@@ -13,6 +22,24 @@ class ConstructorMockTest {
         fun chainOp(a: Int, b: Int) = MockCls(a + b + x)
     }
 
+    @Test
+    fun test1() {
+        mockkConstructor(ExampleClass::class)
+
+        every { anyConstructed<ExampleClass>().exampleProperty } returns 0
+
+        assertEquals(0, ExampleObject.getExampleProperty())
+    }
+
+    @Test
+    fun test2() {
+        mockkConstructor(ExampleClass::class)
+
+        every { anyConstructed<ExampleClass>().exampleProperty } returns 0
+
+        assertEquals(0, ExampleObject.getExampleProperty())
+    }
+
     @Test
     fun simpleTest() {
         mockkConstructor(MockCls::class)