fix(components) $dispose not always called

Let's consider a template like that
```
<template test(data)>
  <#data.ref />
</template>
```

When changing the component template behind `data.ref` corresponding
`$dispose()` method (if any defined in the controller class) was not
executed.

Closes #306