[WIP] Hotfix for minimize-restore animations

For some weird reason, the minimize animation is not working properly if certain conditions are true. Consult #1528 for the details. This PR fixes this issue by changing a little bit of the internal structure of the `GlowWindowBehavior`.
Also, the behavior has been enhanced in some ways.

Resolves #1528