Extends `invalidate`

Calling `invalidate` returns now the invalidated parts as an array. Adds
also unit tests.
Moves `watchVisibility` into `autorefresh` plugin
Merge pull request #254 from witrin/#239

Autorefresh, invalidate and hidden container