Fix issue with setting content inset.

1. Fix bug with invalidating timer in some cases
2. Sometimes content inset increase/decrease calls were not consistent so that it becomes broken