Ui tests clear caches

Adding object caches broke the UI tests. Each UI test makes an instance which is added to the object cache. When the test is over the instance disappears when its transaction is rolled back, but the cache was not being re-initialized. Now we clear the object caches before running each UI test.