Quick Settings: Better handling for panels

When notification panel is pulled down, the first flip to quick settings when pressing the qs button is broken (this was introduced by swipe to switch feature, swipe way works btw). The issue is present only if notification panel (and not quick settings' one) is pulled down and then we switch to qs one. Switching from QS panel to notification's one does not show the broken flip. The issue is now fixed.
Introduced a better way to recalculate flip animation delay for swipe and cleaned up a bit too (not needed lines).
A big thanks to SlimRoms for their great source.